Java has different memory spaces. To put it very simply the classes are a
template for objects, they are kept in a permanent memory space, because
dependent on what you do with Geoserver you may need them any time. At
runtime these templates let's say a map class is filled with values and
becomes an object, for you to work with. As you need this object just a
short time until you have created your map, it is put into a transient
memory space called the heap, which changes permanently.

Using the Xmx and Xms parameters influences only your heap. However, your
error message is: I am running out of PermGenSpace, i.e. the permanent
memory space is too small. Geoserver has a lot of classes and configuration
files and needs therefore a generous PermGenSpace.

There are two parameters to influence that.

-XX:PermSize=<initial size> 
-XX:MaxPermSize=<maximum size>

There is a faq that explains Java memory management:
http://java.sun.com/docs/hotspot/gc1.4.2/faq.html
still valid although Java 1.4.2

I found for the wrapper.conf, (I am not using Jetty but Tomcat)  @
jira.codehaus http://jira.codehaus.org/browse/SONAR-803:
 
wrapper.java.additional.2=-XX:MaxPermSize=128m

different program but this shouldn't matter. 128m is a size that is
sensible. Standard is 64m, as far as I know. 

It would make a lot of sense for you to monitor your memory use, because the
memory configuration is very dependent on how you use your server. During
memory clean-up (= garbage collection) your server does nothing, well - even
with parallel garbage collection it does next to nothing, so you want a
compromise between short interruptions (many smaller garbage collections)
and the quantity of interruptions (not too many) for garbage collection.
That means you need to have a look what your server does.

You can do this with two other parameters:

-Xloggc:Drive:\directory\logs\yourlog.log
-XX:+PrintGCDetails

There is a free viewer http://www.tagtraum.com/gcviewer.html. There may be
others, but that is the one I use for years.

If you want to know more:
http://www.oracle.com/technetwork/java/javase/tech/memorymanagement-whitepaper-1-150020.pdf

Cheers

Christian



-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002


Telephone:        +61-3-8636 2325
Telefax:              +61-3-8636 2813
--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/out-of-memory-issues-GeoServer-2-2-RC3-tp5001712p5001817.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to