tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: Very Long Full GC after Inactivity
Date Mon, 08 Oct 2007 20:48:32 GMT
garbage collection is a reactive process, ie, it wont kick in until it 
really needs to.
and the time it takes for the GC, depends on your java heap size, -Xmx,

in JDK 1.5 you can specify GC goals like
-XX:MaxGCMinorPauseMillis=<value>
-XX:MaxGCPauseMillis=<value>

to tell the JVM to try to align its GC to meet these goals, however, 
with JDK 1.4.2 you could try to make your heap smaller or to put in 
manual System.gc() at a periodic interval,
neither of these options is what I like, I would just upgrade the JDK, 
even though you said its not an option, it would be your best bet

for a list of all your jvm options at hand, please take a look at
http://blogs.sun.com/watt/resource/jvm-options-list.html

Filip

Bill Clarke-Fields wrote:
> Hi,
> We are running an application on Tomcat 5.0.28 with Java 1.4.2.  The usage
> of the application is very cyclical.  It is used heavily during the day, and
> lightly at night.  During peak daytime hours, a full garbage collection
> takes less than 2 seconds, which is fine.  However, after a long period of
> inactivity in the evening, a full garbage collection will be triggered and
> take a very long time.  Sometimes over a minute!
>
> Is there any way to avoid this long garbage collection?  Why does it take so
> long?  (Maybe because it is filling up with many small objects over time
> rather than a few larger objects?)
>
> Thanks for your help.
> -Bill
>
> p.s. Upgrading to a newer version of Tomcat or Java is unfortunately not an
> option at this point.
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message