cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject Re: Cocoon/Tomcat blocks requests at some point and hangs?
Date Wed, 16 Feb 2005 15:33:50 GMT
thanks very much for your notes, although I am not sure if we actually
experience the same problem, but it's good to know anyway and I will 
definitely send a note if we will find out.

Thanks

Michi

Ryan Agler wrote:

>This problem had been plauging me for years, at random times Tomcat would
>just lock up and had to be restarted.  My setup is similar to yours, four
>cocoon webapps running under tomcat 5.5 behind Apache.  Dual PIII 933mhz
>with 1gig RAM on redhat 8 
>
>I FINALLY found the cause and solution:
>
>The problem was that, with four cocoon webapps, each having over 120 .jar
>files in WEB-INF/lib, and each with hundreds of .xsp pages, the JVM
>permanent generation was being filled up with more classes than it could
>handle.  This would cause the JVM to thrash with constant garbage collection
>(and thus lock up Tomcat).  I assumed that by increasing -Xmx I would be
>covered, but not so -- the permanent generation is a completely separate
>beast.  Adding the following options to catalina.sh fixed the problem:
>
>-XX:PermSize=64M -XX:MaxPermSize=128M -XX:+CMSPermGenSweepingEnabled
>-XX:+CMSClassUnloadingEnabled
>
>Also, I found the JVM UseCMSInitiatingOccupancyOnly helped optimize the
>garbage collection even more.  Here is the complete set of JVM options I
>use, they seem to be working great for the last month or so:
>
>-server -Xms256m -Xmx512m -Djava.awt.headless=true -XX:NewSize=24M
>-XX:MaxNewSize=24M -XX:PermSize=64M -XX:MaxPermSize=128M
>-XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:+DisableExplicitGC
>-XX:+UseParNewGC -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC
>-XX:+CMSParallelRemarkEnabled -XX:+CMSPermGenSweepingEnabled
>-XX:+CMSClassUnloadingEnabled -XX:+UseCMSCompactAtFullCollection
>-XX:CMSFullGCsBeforeCompaction=0 -XX:CMSInitiatingOccupancyFraction=80
>-XX:+UseCMSInitiatingOccupancyOnly
>
>A single CPU machine will need slightly different options.
>
>Hope this helps,
>
>+Ryan
>
>  
>
>>>cocoon 2.0.4 and cocoon 2.1.6
>>>on tomcat 5.0, redhat 9, with apache at front, serving 
>>>      
>>>
>>several cocoon 
>>    
>>
>>>based web sites
>>>
>>>the box: piv 2.4 1G Ram
>>>
>>>
>>>periodicaly tomcat hangs and needs restart
>>>
>>>i dont have figure until know what cause the problem
>>> 
>>>
>>>      
>>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message