Hi,
I'm profiling a tomcat web application that oftenly fails with OutOfMemoryError (this has nothing to do with my previous post about tomcat, it's a completely different project). I have about 150 users, pages have some javascript code to poll on my web application every two minutes. Tomcat runs in a JVM launched with -Xmx1024m, so.. I think that 1GB should be enough for 150 users, right??
I suspect that some references to unused objects are being kept. So in a test environment I've profiled this web application with a test client that sends lots of requests. Memory usage appears quite stable, but the "surviving generations" value continues to increase (it diminished significantly only once).
I've read some articles about surviving generations. Some of them say that it means a memory leak, some others say that it's not always an actual memory problem. But the main trouble is that
I'm not sure I understood what "surviving generations" means.
From NetBeans help:
Quote:
- Surviving generations. The number of different ages for all objects allocated on the JVM heap since the profiling session started.
- Age of object. The age of the object is the number of garbage collections the object has survived.
|
So when an object lives for a long time it's age increases, but it doesn't necessarily increase the surviving generations value, right?? In my application I'm aware of some objects living for long (not recreated).
Profiling results:
http://img253.imageshack.us/img253/3...lectionnu9.png
(surviving generations in pink, time spent in GC in violet)
http://img147.imageshack.us/img147/2...emoria2tg4.png
(memory use in violet, heap size in pink)
The stability that can be observed around 12:05 was a short period in wich the client program was not sending any requests.
Thanks in advance