• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Have to restart Tomcat every 30 mins

 
Saumya Nair
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

We have dan application in JSP which runs on Tomcat4.. Using jdk 1.4 version.... The application is being accessed by many users.. But recently it has been observed that it consumes a lot of memory & the server hangs..& hence we have to restart the server every 30 mins.. Can anybody please suggest what can be the possible cause & how to solve it...



Regards,
Saumya
[ July 21, 2006: Message edited by: Bear Bibeault ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody please suggest what can be the possible cause


One way to figure out the reason why the server hangs, is to obtain a thread dump. You can do so by using 'Ctrl + Break' in Windows on the tomcat server console. Obtain the thread dump when the server hangs. The output will show the list of threads and the operations these threads are performing. You can then analyze the thread dump to get to know about the actual cause of the server hang
[ July 21, 2006: Message edited by: jaikiran pai ]
 
Murad Iqbal
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ideally, get your application to generate logs and print meaningful messages in them. You can then trace what can then be the cause. You may want to try out Log4j.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without access to your app, would be hard for folks on a forum such as this to give you much meaningful help.

I can say the primary culprit in these types of cases is a failure to close database connections or to return them to a connection pool if one is being used.

It is also often the case that an app just needs more memory than the 64k default alloted to a JVM. You may just need to increase the heap size when starting Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic