1. Completely stops accepting requests
2. All requests result in no response
3. Most requests continue to work but one or more just don't reply
4. something else
If this was my problem and the logs did not reveal the problem, I would use the Tomcat Management application to monitor the state of the server. It will show you what all the current requests are doing.
If heavy database interaction is involved you may be overloading the back end or failing to recover database connections. Does the servlet use a Database connection pool?
Joined: Feb 24, 2010
What I mean by hanging.....
I select a control on the html screen to do something then the hourglass is displayed and nothing else happens. I expect a response page but never get it. I could wait for 5 or 10 minutes then eventually I close the browser. I'm not able to log back into the web site.
I'm only now learning how to use the manager console.
The site is useing connection pooling.
How would I use manager console to find where the problem is? What would I look for?
Author and all-around good cowpoke
Joined: Mar 22, 2000
That symptom sounds like the request has gone into an endless loop or is otherwise waiting for something that will never happen.
This will show on the Management list of request Threads as a Thread with a really long running time.
This happened to me once when I was experimenting with a servlet which accessed a javaspaces server to create a response - when I neglected to start the server, requests would wait for a connection - which of course never happened. Other requests were processed normally but eventually all Tomcat request threads were hung.
Does your application use a database connection pool?
Joined: Feb 24, 2010
Thanks for the info. Your suspicion about connection pooling was correct.
It took much work but I was able to duplicate the problem in my test environment.
It was just a matter of putting in debug statements all over the place to isolate the exact line of code causing the problem.
Tomcat configuration was set to allow no more than 10 db connections.
This was quickly being reached and the thread was stalling.
We increased the allowed connections for a temporary fix.
The permanent fix will be to rework the code to better manage the connections.