aspose file tools*
The moose likes Performance and the fly likes java.lang.OutOfMemoryError in Tomcat    Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "java.lang.OutOfMemoryError in Tomcat    " Watch "java.lang.OutOfMemoryError in Tomcat    " New topic
Author

java.lang.OutOfMemoryError in Tomcat

visvac firvin
Greenhorn

Joined: Mar 14, 2007
Posts: 3
Hi,
We are running an intranet application using JSP/Java and Tomcat Server. We are getting the following error.








Particularly we are getting this error when the Current Thread equals the Busy thread count in manager. And when it reaches the max thread, the server crashes. We even tried to increase size of the heap and also thread size. We could not identify why the server is crashing.

Connection Pool settings:
Maximum active connections: 10
Max idle connection : 4

Thread Settings

Max threads : 53
Min spare threads : 5
Max spare threads : 15

Tomcat is running on HP-UX server. It supports only 64 threads per process. I've even tried setting the heap size to 1gb and tried analyzing the heap using verbosegc option.But nothing helped.


Please help.


Regards,
Firvin
Shilpi M Ag
Ranch Hand

Joined: May 07, 2004
Posts: 40
Firvin

I dont think its the threads which are a problem. You have a memory leak I believe. Also, its possible that you just need more memory for the java process (tomcat instance i.e.)

shilpi
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
Does the out of memory error occure after only a few requests have been processed or does it run for days before crashing?

If this was my problem I would be using the Management app to watch the Threads and Memory use. I had a problem once where requests Threads were just hanging - waiting for something - you will see this on the management display.

Bill
visvac firvin
Greenhorn

Joined: Mar 14, 2007
Posts: 3
Shilpi
We have analyzed for memory leak too.. it is something like the when a menu item is clicked there is a sudden spawn of 20-30 threads which we are not sure which process is creating..Increased to max size to 256mb..Its in production

Bill
We are analyzing with the mgmt console.. the thread count does not hang but increases abruptly

Now we are using Lamdaprobe for identifying..Still no soln..
Daniel Amadei
Ranch Hand

Joined: Mar 29, 2005
Posts: 94
Hi!

You are probably running out of the number of avaiable threads to be created by the operating system.

If you say it happens when you click a menu item, can be a bug in your app, but the message is clearly that its being unable to create a new OS thread.

Try running you app with TUSC to trace the system calls.

Daniel
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
when a menu item is clicked there is a sudden spawn of 20-30 threads


Yow! You really should look into what is causing that. If a single user can consume that many Threads, even a modest load will kill the server.

Bill
 
jQuery in Action, 2nd edition
 
subject: java.lang.OutOfMemoryError in Tomcat