tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Smith" <>
Subject Re: Sad: Tomcat 5.5.x crashes almost every single day.
Date Wed, 01 Mar 2006 04:03:04 GMT
Hi Tomasz,

this is the exact point I was making in my previous email. The error 
message that was returned was to do with the Java Heap Space. It may be 
referring to the entire heap that is allocated to the JVM, who knows. 
The problem can be fixed by increasing your -XX:MaxPermSize value to 
more than 256. In my view that really isn't enough especially if you 
have 8 applications running within Tomcat. It it is possible to get some 
sort of stack trace from the native code, you will see that this OOM 
error occurs while trying to resize the PermGen as below. See the line (1).

( 0)  0xc5bf0474   vm_exit_out_of_memory__FUlPCcb + 0x47c  
( 1)  0xc5e89d78   compute_new_size__9PSPermGenFUl + 0x150  
( 2)  0xc5e86024   invoke_no_policy__11PSMarkSweepSFPbb + 0x244  
( 3)  0xc5e8b814   invoke__10PSScavengeSFPb + 0x154  
( 4)  0xc5e51f4c   failed_mem_allocate__20ParallelScavengeHeapFPbUlbT3 + 
0x64  [/opt/java1.5/jre/lib/PA_RISC2.0/server/]
( 5)  0xc5f6a78c   doit__29VM_ParallelGCFailedAllocationFv + 0x54  
( 6)  0xc5f6a280   evaluate__12VM_OperationFv + 0xb0  
( 7)  0xc5f691e0   evaluate_operation__8VMThreadFP12VM_Operation + 0x48  
( 8)  0xc5f698a0   loop__8VMThreadFv + 0x558  
( 9)  0xc5f68f24   run__8VMThreadFv + 0xd4  
(10)  0xc5e39b20   _start__FPv + 0x148  
(11)  0xc004b168   __pthread_body + 0x44  [/usr/lib/libpthread.1]
(12)  0xc00549ec   __pthread_start + 0x14  [/usr/lib/libpthread.1]

Download and use a program called visualgc available here You can have it running during 
the day and monitor what the garbage collector is doing and how the
Eden, Old and Perm Gen heap spaces are growing. If Tomcat is not 
throwing an OOM error then the Garbage Collector could be trying to do 
Full GC's causing Tomcat to hang and become unresponsive. There is a 
flow on affect here, which makes it look as though the problem is caused 
by something else.


Tomasz Nowak wrote:
> Peter Lin <> wrote:
>> look at the dump, it looks like the permgen ran out of space
>>  PSPermGen       total 50304K, used 50170K [0x445f0000, 0x47710000,
>> 0x545f0000)
>>   object space 50304K, 99% used [0x445f0000,0x476ee878,0x47710000)
>> try increasing your permGen to 128Mb. Another option is to use a jdk
>> that doesn't have permGen like JRockit.  Sun's PermGen is not resized
>> once the JVM starts, so if the webapp has lots of classes, it can
>> exceed the PermGen size.
> As you see at the bottom of the file I have already 256m PermSpace.
> Another issue is that if Tomcat 5.5.x runs out of PermSpace, it logs:
>   java.lang.OutOfMemoryError: PermGen space
> in contrary to:
>   java.lang.OutOfMemoryError: Java heap space
> And heap space OOME is the one that has been logged.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message