• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Java Tomcat web application limit  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a small production web application on a virtual dedicated server with CentOS 5.4, java 1.6.0, apache-tomcat-6.0.18, and mysql 5.0.77.
After very heavy traffic, I could no longer access my website. I got a blank screen. The catalina log said only that contextDestroyed() of the ContextListener was called.
I redeployed the application and everything seems fine. Did I hit a limit of some kind in Tomcat or Java that caused the application to crash?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need more information, use the Management App to watch the various parameters, such as busy Threads.

Tomcat will become unresponsive it all request Threads are hung somewhere.

Bill
 
Harry Jones
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difficulty with monitoring the application is that the crash was an isolated incident. The application has been up for a couple years without this kind of problem, although I have redeployed the application from time-to-time for other reasons.
I do create a thread pool for sending out emails, but there are only 3 threads in it, and there were only 2 users on line when the application crashed. But the traffic that day had been heavy.
Thank you for your feedback. I will look into the app. Could the problem be related to memory or garbage collection up?
 
Bartender
Posts: 20725
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're lucky, a cosmic ray came streaking through one of the RAM chips, flipped a bit and scrambled something that was cleaned up on restart.

If not, it will probably happen again, and experience says that even if the bug was 15 years old, once it pops up, it manifests itself fairly frequently, for better or worse.

In cases where the JVM is still operational but Tomcat is delirious, try taking a snapshot dump for offline post-mortem analysis. It might be able to give some clues.
 
Harry Jones
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And it will probably happen again at the worst possible time, as it did the first time. What is a snapshot dump? Thanks.
 
Tim Holloway
Bartender
Posts: 20725
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Murphy's Law. Besides, there's nothing like running under stress to find those leaky bits of memory, files, network sockets and other resources.

The exact method of getting a heap dump will vary depending on whose JVM you are running. IBM, for example, has its own tools. However, for the Original Sun JVM, this is a good starting point:

http://docs.oracle.com/cd/E19798-01/821-1752/beafo/index.html

I had to dig harder to find it than I should have, though.
 
Harry Jones
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much. I appreciate everyone's help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!