• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Out Of memory issue on tomcat.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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!

Could anyone help us on this issue?
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I always suggest using the Management app to keep an eye on memory and request Thread usage.

Bill
 
Shama Nagabhushan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ALl,

But my question is, why does the heap dumps gets created or there is OOM when the tomcat server is restarted. We have installed Sun IdM application on tomcat.

Could anyone tell me if the heap dump is created due to the application issue or due to tomcat issue?

Thanks.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You appear to be hoping that someone will say "oh yeah tomcat does that all the time for no reason" - sorry, nobody is going to say that.

Given the long record that Tomcat has for correct execution I would bet a lot of money that your application is doing something wrong, just like Tim said.

Have you actually used the Management app like I suggested? How about the memory dumps, any progress there?

Bill

 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Shama Nagabhushan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jayesh,

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.

Thanks,
Shama
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic