wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes My app hangs in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply locked New topic
Author

My app 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

P.S. I am duplicating this post in this forum as I do not know what could be the cause of this problem.
Joe Matthew
Ranch Hand

Joined: Jun 10, 2008
Posts: 66
Are you using Connection Pooling provided by Hibernate. How many connections are you opening? When you do some functionality, it tends to hang. Which are those functionalities. What is done in them? Any loops creating Beans or connections.

These questions need to be answered to get an idea of where the problem is. Change all the Spring Beans to singleton and see if it solves your problem. Injecting Hibernate into Spring has memory leaks which depends on the version of Spring you are using.

How much memory have you allocated to the heap memory?
[ June 26, 2008: Message edited by: Joe Mathew ]

Regards,<br />Joe<br /> <br />"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live."<br />--Martin Golding
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My app hangs in Tomcat