Re: [thredds] TDS4 Memory settings: PermGen?

Roy,

I guess the lesson learned is:

Anyone running the TDS would be wise to read through the entire tutorial at:

http://www.unidata.ucar.edu/Projects/THREDDS/tech/tutorial/

and that includes me!

Thanks,
-Rich

On Wed, Aug 26, 2009 at 11:54 AM, Roy Mendelssohn
<Roy.Mendelssohn@xxxxxxxx>wrote:

> They also have a section on the same error:
> Caveat of the manager applicationPermGen info
>
> For a really good description of the issue, see this series of three
> articles:
>
>    - "Return of the 
> PermGen<http://my.opera.com/karmazilla/blog/2007/09/29/return-of-the-permgen>"
>    (2007-09-29)
>    - "PermGen Strikes 
> Back<http://my.opera.com/karmazilla/blog/2007/03/15/permgen-strikes-back>"
>    (2007-03-15)
>    - "Good Riddance PermGen 
> OutOfMemoryError<http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror>"
>    (2007-03-13)
>
> The dreaded java.lang.OutOfMemoryError: PermGen space failure error:
>
>    - *The issue: *The "PermGen" error happens when the JVM runs out of
>    memory in the permanent generation.
>    - *The cause: *Objects in the permanent generation are never garbage
>    collected. When redeploying your web application using the Tomcat
>    manager application, your WAR file is unpacked and parts of the class
>    file definition are loaded into PermGen space, like string constants.
>    - *The symptom:* The PermGen error will manifest itself in a sluggish
>    Tomcat manager application that never completes a task, and 
> thejava.lang.OutOfMemoryError:
>    PermGen space failure error being displayed in
>    $TOMCAT_HOME/logs/catalina.out
>    - *A temporary fix:* You can add the -XX:MaxPermSize switch to
>    $JAVA_OPTS to increase the amount of memory allocated for the permanent
>    generation, However this is only postponed the inevitable, as even an
>    increased memory in permanent generation will eventually fill up. When this
>    happens, you will need to stop/start Tomcat at this point. For this reason,
>    you may want to restart Tomcat whenever you redeploy TDS or another webapp.
>
>
> -Roy
>
>
> On Aug 26, 2009, at 8:27 AM, Rich Signell wrote:
>
> THREDDS folk,
>
> I see that these is a TDS tutorial updated August 6 at:
>
> http://www.unidata.ucar.edu/Projects/THREDDS/tech/tutorial/index.html
>
> In the section on "Installing Java and Tomcat" I see that it's recommended
> to create a setenv.sh script in the <tomcat>/bin directory with these
> options:
>
> JAVA_OPTS="-Xmx256m -Xms256m -server -Djava.awt.headless=true"
>
>
>
>
> I've noticed that on our TDS4 installations, I often get a "PermGen" error
> which causes tomcat to hang.    On this page:
>
> http://confluence.atlassian.com/display/CONF29/Fix+Out+of+Memory+errors+by+Increasing+Available+Memory#FixOutofMemoryerrorsbyIncreasingAvailableMemory-PermGenSpaceParameters
>
> I read:
>
> Heap space memory errors will contain only a java.lang.OutOfMemoryError. If
> you get the error message: java.lang.OutOfMemoryError: PermGen space this
> means that you have exceeded Java's fixed 64Mb block for loading class
> files. You will need to add the argument -XX:MaxPermSize=256m to JAVA_OPTS,
> in addition to any argument you use to set the heap size.
> PermGen Space Parameters
>
> JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m
> -Djava.awt.headless=true "
>
> So I've set this my setenv.sh file for my Tomcat installation to read:
>
> JAVA_OPTS="-Xms128m -Xmx1024m -server -XX:MaxPermSize=256m
> -Djava.awt.headless=true "
>
> I have no idea yet whether this will help, as I just added the MaxPermSize
> parameter today.   Anybody else have experience with PermGen problems
> running TDS4 and know if this should help or how to avoid in the first
> place?
>
> Thanks,
> Rich
> --
> Dr. Richard P. Signell   (508) 457-2229
> USGS, 384 Woods Hole Rd.
> Woods Hole, MA 02543-1598
>
> _______________________________________________
> thredds mailing list
> thredds@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
>
> **********************
> "The contents of this message do not reflect any position of the U.S.
> Government or NOAA."
> **********************
> Roy Mendelssohn
> Supervisory Operations Research Analyst
> NOAA/NMFS
> Environmental Research Division
> Southwest Fisheries Science Center
> 1352 Lighthouse Avenue
> Pacific Grove, CA 93950-2097
>
> e-mail: Roy.Mendelssohn@xxxxxxxx (Note new e-mail address)
> voice: (831)-648-9029
> fax: (831)-648-8440
> www: http://www.pfeg.noaa.gov/
>
> "Old age and treachery will overcome youth and skill."
> "From those who have been given much, much will be expected"
>
>


-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598
  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: