Hello,
I recently ran into a problem with a webservice leaking memory badly when its hammered with request.
After some research it seems that the garbage collector cannot keep up?
The webservice itself it a java wrapper*(axis and some custom code) around a pl/sql procedure.
And yes all connection and jdbc objects are closed/freed.
It is my believe that the GC cannot keep up near the end.
I try to create a testcase to reproduce this. I cam up with the following but I cannot understand why I get out of memory errors.
There are hardly any references kept by classes. All objects instanciated should be ready for garbage collection right after they have been created, why does it run out of memory?
In the log I can see the number of instances increase but hardly any finalizers being called near the end.
At the start a fair number of finalizers gets called but this stops.
In terms of memory usage I see the expansion at first and when its getting close to the 64M mark (yes I know this is implicitly set and I can increase this) the finalers stop being called and memory stops being freed.
It was I was afraid the object creation in simpleobject was keeping the object on the method stack so I removed the instantiation to its own method. But I�m not sure if this helps.
I know this program is ridiculous and I�m not even sure if it represent the problem in the webservice but I just cannot understand what is going on. I have like NO references why aren�t all simpleobjects being finalized? Near the end (60secs) I see around 1.000.000 open instances not being gc�d.
I have read:
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html But this does very little.
I can increase the programs life to 120 seconds but the processes comes to a near stop from 70-120secs
I used the parameters:
Note that the guide lists �XX(+)CMSIncrementalDutyCycle=10
With an extra (+) this is wrong and not accepted by the JVM
Another thing which I have noticed and which I cannot believe is that when I compile my source as 1.2 instead of 1.4 it crashes even earlier and GC behaviour seems even more out of control, releasing even less objects.
Anyone got a clue what is going on?
[ June 06, 2008: Message edited by: Anton Gerdessen ]