[server-admins] Tomcat

DM Smith dmsmith at crosswire.org
Mon Aug 3 11:10:28 MST 2009


On 08/03/2009 12:21 PM, Manfred Bergmann wrote:
> There were again out of memory problems with Tomcat.
> Can someone please have a look.
It is the "PermGen space" problem.

By default Sun's Java reserves 64M for perm gen, which is used for 
loading class files. From what I read, having the same jars in multiple 
locations (e.g. local to a web app) aggravates the problem.

It is managed via the -XX:MaxPermSize flag and should be set in the 
$CATALINA_HOME/bin/setenv.sh file in the JAVA_OPTS variable. (For us 
catalina home is /opt/tomcat) E.g. :

export JAVA_OPTS="-XX:MaxPermSize=128m"

I suggest that you start small and increase it if the problems persist.

> I restarted the forums context three or four times today, was it 
> caused by that?

It could be. I've found that Tomcat had (perhaps still has) a memory 
leak and does not respond well to restarting apps. Through 
experimentation I found it better to stop and restart apps. Though the 
perm gen problem can still be hit. From what I read, it is not subject 
to garbage collection.


-- DM

>
>
> Manfred
>
>
> Am 30.07.2009 um 11:36 schrieb Manfred Bergmann:
>
>> Hi.
>>
>> Tomcat doesn't come up again.
>> If you check the logs, there was a "out of memory" Exception which 
>> casued that the web page was unaccessible.
>> I tried to restart but it said that it can't bind to port 8080 
>> because it is already used.
>> "ps" shows a Tomcat process is still active though I don't know where 
>> that comes from and I don't dare killing it.
>>
>>
>> Manfred
>
>
> _______________________________________________
> server-admins mailing list
> server-admins at crosswire.org
> http://www.crosswire.org/mailman/listinfo/server-admins




More information about the server-admins mailing list