code-gijoe
code-gijoe

Reputation: 7234

How can I debug tomcat request threads?

I have a Tomcat application running and for some reason one of my servlets is being put on hold while all the others respond while requests are being executed.

My connector config for Tomcat :

<Connector port="8008" protocol="HTTP/1.1"
maxThreads="50" minSpareThreads="5" maxSpareThreads="50"
    enableLookups="false" acceptCount="100"
           connectionTimeout="20000" 
           redirectPort="8443"
           compression="off"
           allowTrace="true"
compressionMinSize="128"
 noCompressionUserAgents="gozilla, traviata"
 compressableMimeType="text/html,text/xml,text/x-gwt-rpc; charset=utf-8,application/json; charset=utf-8,application/javascript" />

My GWT RPC servlet keeps responding while a very long request is being executed. But I created a servlet outside GWT (i.e. a plain old servlet) and when I send requests to this one, it will not respond until the long GWT request is over. It actually does not start executing at all (I added logs to see if it actually starts executing and it doesn't until the end of the log gwt request).

How can I debug the thread pool / inbounding request queue of Tomcat instance?

Upvotes: 0

Views: 791

Answers (1)

mindas
mindas

Reputation: 26713

Look at your IDE debug settings.

For example, on IntelliJ IDEA, you need to change Suspend policy to Thread in breakpoint settings. This means that only this thread which stopped for breakpoint will block and others will continue to run as normal.

Upvotes: 1

Related Questions