Skip to main content

GC problems, heap grows

2 replies [Last post]
Joined: 2010-08-17


I’ve a problem with performance.
Java+jruby web application works under Tomcat 5 onto server with the following parameters: Solaris x64, amd64, 64-bit Java, RAM 8GB, CPU 2,7 GHz.

I have load test which simulates workload with any number of users.

Configurational file is attached (in zip). I ran tests with the parameters as in the attached file, only newRatio parameter was changed during passing tests.

server.xml is attached too (in zip).

First Test:
number of user: 50

First Test Results:


Second Test:
number of user: 50

Second Test Results:


Third Test:
number of user: 50

Third Test Results:

All files in the attached archive which is available via

With the lapse of time heap size grows and after a few minutes tomcat frozen and application is not accessible. I think that GC cannot clean the necessary heap.

Could you please help me to understand and solve current problems? Maybe we must change something in GC properties in Tomcat or something else?

With my true regards,
Sergey K.

Message was edited by: siarheik

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-01-07

Most likely you have a memory leak somewhere, which means there are still references to objects which are not needed anymore - preventing the GC from freeing the space occupied by those objects.

Another possibility is that you have too many sessions open.

- Clemens

Joined: 2010-08-17

First of all I would like to say that all mentioned below files are available by the link -

Please allow me to explain the situation on the other hand.

I ran a test with 5 users. Duration of this test was near 3.5 hours.

Heap usage is represented at "heap_usage.jpg".

My test is consists of 1 request (except login and logout actions) which you can see in "piece of catalina log.out". As you can see, sometimes time of the request reaches 1,5 min instead of normal execution time which equals 1.5 sec!

At "GC usage.JPG" you can see the GC activity. As I right understand tenured generation consists of objects which still have references. On screenshot we can see that the tenured generation space is growing. Does it means that there is a memory leak in app?

Or GC can not cope with the work?

Application is not accessible when heap is big:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: Error reading from remote server

Heap dump was created by mat tool too - "mat.jpg". We can see a big jruby objects.

maybe you could provide me with another tool for analyzing threads?