Hi,

I have a Apache-tomcat environment serving simple .jsp's.

Issue - After few days of application  been up, we see Java heap out of
memory error.

Steps taken: The Tomcat was configured to run with default heap size. Seeing
Java Heap memory issue, i increased it and the setevn.sh file looks like -

CATALINA_OPTS='-Xms256m -Xmx256m -XX:+HeapDumpOnOutOfMemoryError
-Xloggc:/appl/gcdata/gcdata.txt -XX:+PrintGCDetails'

Looking at Garbage Collection graph it is seen -
1>  minor Collections spikes to around 1sec after few hrs in between.
2> The maximum and minimum heap size is configured as 256MB, but slowly in
couple days, the total heap size reducing automatically and Full Collections
becomes frequent to a extend that minor collections stop happening. JVM
starts triggering only full collection.

just a snapshot of jmap,

[r...@saml-app lib]# jmap -heap 8130
Attaching to process ID 8130, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 1.5.0_18-b02

using thread-local object allocation.
Parallel GC with 4 thread(s)

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 268435456 (256.0MB)
   NewSize          = 2686976 (2.5625MB)
   MaxNewSize       = -65536 (-0.0625MB)
   OldSize          = 1835008 (1.75MB)
   NewRatio         = 2
   SurvivorRatio    = 8
   PermSize         = 21757952 (20.75MB)
   MaxPermSize      = 88080384 (84.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 33947648 (32.375MB)
   used     = 15199704 (14.495567321777344MB)
   free     = 18747944 (17.879432678222656MB)
   44.77395311745898% used
>From Space:
   capacity = 3276800 (3.125MB)
   used     = 1835008 (1.75MB)
   free     = 1441792 (1.375MB)
   56.0% used
To Space:
   capacity = 3735552 (3.5625MB)
   used     = 0 (0.0MB)
   free     = 3735552 (3.5625MB)
   0.0% used
PS Old Generation
   capacity = 178978816 (170.6875MB)
   used     = 69737192 (66.5065689086914MB)
   free     = 109241624 (104.1809310913086MB)
   38.96393638004623% used
PS Perm Generation
   capacity = 21757952 (20.75MB)
   used     = 15172568 (14.469688415527344MB)
   free     = 6585384 (6.280311584472656MB)
   69.73343814711973% used

JVM is 64bit. Once thing more, the application code is quite old and was
running on Java 1.4.

Any suggestions

Kulbir

Reply via email to