[server-admins] Tomcat

Troy A. Griffitts scribe at crosswire.org
Mon Aug 3 12:23:34 MST 2009


Thanks DM and Manfred.  I've added a fairly aggressive memory usage 
configuration at /etc/profile.d/java.sh  We had this in place but had 
troubles with tomcat not serving after a while.  I think that problem 
was due to a lack of resources granted in /etc/security/limits.conf  So, 
I've put these parameters on JAVA_OPTS back in place.  I added the 
-XX:MaxPermSize as you have suggested, but cranked it up.  We have 
32gigs of memory on the server and I'd actually like to start using some 
of it for other than disk cache.  Let me know if you think there are any 
detriments to a higher than needed limit.  Thanks for working on this guys.

	-Troy.



DM Smith wrote:
> 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
> 
> 
> _______________________________________________
> 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