On 12/22/2010 5:39 PM, John Maurer, IV wrote:
Hi All,
With Rich Signell's help, I was recently able to end a bout of daily
PermGen errors after my TDS 4.2 upgrade and wanted to shared the
solution here in case it might be useful to others. As recommended in
TDS training
<http://www.unidata.ucar.edu/projects/THREDDS/tech/tutorial/GettingStarted.html>,
I had previously used the following JAVA_OPTS settings to increase the
initial and maximum allocated memory of the JVM to help performance
and avoid frequent PermGen errors:
-Xms512m -Xmx1500m
However, after 4.2 my system was hung with daily PermGen errors in my
catalina.out despite the above settings. In addition to the above,
Rich recommended the following, which I also subsequently found echoed
in the TDS FAQ
<http://www.unidata.ucar.edu/projects/THREDDS/tech/tds4.2/faq.html#permGenOutOfMemoryError>
(which shows 128m):
-XX:MaxPermSize=180m
Since making the above addition, I have not had anymore PermGen errors.
Cheers,
John Maurer
Hawaii Ocean Observing System (HiOOS)
University of Hawaii
P.S. You can update JAVA_OPTS in $TOMCAT/bin/setenv.sh. My file
includes the following line for JAVA_OPTS (plus a couple others for
setting JAVA_HOME and CATALINA_HOME):
JAVA_OPTS="-Xmx1500m -Xms512m -XX:MaxPermSize=180m -server
-Djava.awt.headless=true"
export JAVA_OPTS
Thanks John, I will add this to the docs.
BTW, -Xmx1500m is for 32-bit systems, use more (eg 4096m) for 64-bit
systems.