This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Tomcat and the fly likes My application hangs in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "My application hangs in Tomcat" Watch "My application hangs in Tomcat" New topic
Author

My application hangs in Tomcat

tin Gupta
Greenhorn

Joined: Jun 26, 2008
Posts: 3
Hi All,

I have an application which is running in Tomcat 5.5. It is developed with the heavy use of Spring/Hibernate. It runs well for 1-2 hrs but then just hangs. Tomcat does not show any error (out of memory or some other) in the logs but does not respond to any request. I can only see the app's login page once it hangs.

In my application, a set of 10 jobs (Quartz API) get fired after every 5 minutes. I checked the logs and these jobs tohether take just 3 seconds to finish when the server is running normally. I have checked my code many a times but I doubt its my code's problem.

I have also tried increasing the heap size but it did not help either.

I am really confused as to what can be the issue. Is it some problem with Spring/Hibernate configuration, Memory leaks?

Please suggest me how can i really diagnose the problem and fix it.

Cheers,
Nitin
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

One of the common causes of problems like this is running out of database connections. In your code are you always sure to close database connections after you use them?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12683
    
    5
You might try monitoring with Tomcat's Management application. You can see memory use and request Thread use. I was highly surprised one time to see that my Tomcat had maxed out request Threads due to an improperly removed application - result, it could not respond to new requests.

Bill


Java Resources at www.wbrogden.com
 
jQuery in Action, 2nd edition
 
subject: My application hangs in Tomcat
 
Similar Threads
How a Thread went to sleep
My app hangs in Tomcat
My app hangs in Tomcat
Tomcat hangs while I'm connected to internet
Intermediate Java developer looking for job/mentor