This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
We are using tomcat6.0 as our web application server. But recently we have been observing a lot of Out Of memory issues on the server dut ot which heap dumps are created.!! I have read articles on this forum which could help me in avoiding OOM and heap dump file creation and have implemented it also!!!
I have tuned JVM also.
But the issue is somewhat different in our case. Usually when heap dumps are created due to OOM, we restart the server to recover JVM crash.
Hence We have added the restart script in crontab such that the server is restarted twice a day. But in our case, 15 mins after the server is restarted, I see heapdumps accumulated on /home directory and OOM error on catalina.log file!!!
Heapdumps eat up file system space and we get frequent big brother alerts!
I think you're going to have to sit down and read what's in those heapdumps. Tomcat's memory footprint is fairly small as Java applications go. Most of the memory usage comes from applications deployed under Tomcat.
In particular, there are no known cases where Tomcat servers are running wild on memory usage, so that would indicate that you probably have a badly-behaving web application.
An IDE is no substitute for an Intelligent Developer.
Worrying about heapdumps causing your system to go out of disk space is like worrying about the bathwater being too hot because your basement is on fire. Put the damn fire out first! Fix the OOM first, and the problem of too many heapdumps accumulating on the filesystem will fix itself.
Joined: Jan 31, 2013
I'm new to all these stuffs(being frank, a novice) working on application support project. And have very less knowledge about tomcat and what happens at the server side when we pur application here!
Could you please suggest me a site where I can find information on what happens when a tomcat server is restarted, how it loads the application. What all processes are stopped and invoked, how memory allocation for application is decided in tomcat etc etc which would help in better understanding of the issue.
Tomcat uses standard java memory management. But, like I said, it doesn't use much memory and it has no known issues with Tomcat itself having memory problems.
In the absence of information to the contrary, we can only assume that the web applications themselves contain major memory-management defects and need to be debugged and repaired. Tomcat cannot recover from the sins of others.