• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.OutOfMemoryError in Tomcat

 
visvac firvin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic