How to detect intermittent time out problem in web applications?

Have a n-tire web application and search often times out after 30 secs. How to detect the root cause of the problem?


Asked by: Caroline758 | Posted: 28-01-2022






Answer 1

Log at separation of concerns, in this case at the boundaries of each layer. when you say search, I'd assume that this is a web app where the user is searching for some text.

Is the DB search involved ? Is there a possibility that your garbage collector is kicking in and the search timed out ? Try to log your garbage collection pauses using java command line switches. Later, you can analyse when your JVM was doing GCs. OR you can use a tool like JConsole or JvisualVM.

BR,
~A

Answered by: Haris903 | Posted: 01-03-2022



Answer 2

You can add trace code to log its activities and then look at each operation to see what part times out and why.

Answered by: Melissa612 | Posted: 01-03-2022



Answer 3

Use the tool Wireshark.

Install this tool on each tier and watch the http traffic and packets. This worked for me when debugging a time out issue which actually turned out to be an issue with empty SOAP envelopes.

Doing this will at least tell you which tier the issue is with.

Answered by: Daisy940 | Posted: 01-03-2022



Similar questions

java - GData Error: Intermittent "Invalid root element"

I'm sending GData queries to renders traffic charts for users of Instructables.com using the Java GData package. However, this exception is sometimes thrown: [Line 1, Column 0] Invalid root element, expected (namespace uri:local name) of (http://www.w3.org/2005 Atom:feed), found (:feed The only mention of this error I can find online is


java - Oracle JDBC intermittent Connection Issue

I am experiencing a very strange problem This is a very simple use of JDBC connecting to an Oracle database OS: Ubuntu Java Version: 1.5.0_16-b02 1.6.0_17-b04 Database: Oracle 11g Release 11.1.0.6.0 When I make use of the jar file OJDBC14.jar it connects to the database everytime When I make use of the jar file OJDBC5.jar it connects some times and...


Java Socket reading large data encounters intermittent error

I am developing an application to communicate with a third party application through socket. Basically, my application needs to send some requests to the server, and the server returns some data. When the server sends me back small amount of data, everything works well. But, when I request large amount data from server, my application sometimes doesn't receive complete data and it happens intermittently. I've done ...


java - spring ibatis mysql intermittent asynchronous problem

I'm using ibatis in spring to write to mysql. I have an intermittent bug. On each cycle of a process I write two rows to the db. The next cycle I read in the rows from the previous cycle. Sometimes (one time in 30, sometimes more frequently, sometimes less) I only get back one row from the db. I have turned off all caching I can think of. My sqlmap-config.xml just says: <sqlMapConfig>...


memory leaks - Solving intermittent Garbage Collection problem - Java

I have spring enterprise app running on JDK 1.6 under Windows 2008. The app gets slow or unresponsive at random times. I suspect it is memory leak and the GC is kicking into over drive. How can I troubleshoot this without restarting JVM using java.exe -verbose:gc parameter? I really cannot shutdown this app. I'm planning on doing AppDynamics on it once I can restart it but for know what can I do? What are my optio...


java - Graphics spoilt by intermittent jumps

I have written a game app with bitmaps moving around the screen. It employs a separate thread which writes directly to a canvas. On my Samsung Galaxy Y the animations seems smooth throughout the game, however on a "Tabtech m7" tablet the smooth graphics appear to be interrupted by intermittent freezes of about half a second duration, and spaced about three or four seconds apart. Is it possible that it is just a feature of ...


java - Intermittent Connection Reset by Peer errors in Android connecting to .NET REST endpoint

I'm getting intermittent errors from devices connecting to my IIS REST service via SSL. My app works just fine, but sometimes I get this exception. It is handled properly and does not bring down app.. ut I wonder what does it mean and if there any way to fix it? Currently it causes delays in data retreived. Also, it floods logs and I can't really ignore it.. I wonder if I can better this situation. Is this...


java - Tomcat / Jetty - Intermittent request not handled

I am deploying a Java SOAP servlet with Tomcat/Jetty on a Red Hat server. I start a client on another server that sends 5 requests per seconds. I have a read timeout of 10 seconds and requests take an average of 20 milliseconds to be processed. But sometimes after 1 hour, a request is never answered by the web server. The clients logs a SocketTimeoutException : Read timed out. The load average, iowait...


java - Diagnose intermittent connection timeout?

I have a java client that invokes a thread to hit a servlet and retrieves last few lines from logs at the server, and show the retrieved log lines on the client. Every once in a while, the log thread times out. Application server is Tomcat, but the error is intermittently reproducible across both Tomcat and Websphere, with client on Windows and server on Windows. With client on Windows and server on AIX, this problem has n...


java - Intermittent slow frames on Android OpenGL ES 2.0

I'm getting some slow frames with OpenGL ES 2.0 on Android. Enough so that they are causing stuttering in the rendering. I've put in some lines that output to System.err these two pieces of information: Average draw time over the last 60 frames ("Avg draw time: 2") A frame took over 10 ms to draw, g = GUI draw time, w = world draw time ("Slow frame!!! (29, g=27, w=2)") I've posted some...






Still can't find your answer? Check out these amazing Java communities for help...



Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)



top