[geotk] Out of memory error when decoding CRS

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Wed May 25 07:20:03 EDT 2011


Le 25/05/11 12:52, Jon Blower a écrit :
>
> Sorry to join this late -- I notice that this is a PermGen memory error, which 
> is connected with classloading, not heap memory usage.  This commonly happens 
> when redeploying a web application without a clean restart of the app server.  
> I don't fully understand this type of error, but you might like to try cleanly 
> restarting your app server (if you're using one) or increasing the permgen 
> space using a command-line switch to the JVM (sorry, can't remember what the 
> syntax is!)
>

Thanks for the feedback. Actually there is known issues in Geotk regarding 
undeployment: some threads are not killed and some java.lang.ThreadLocal 
variables are not cleared, which prevent the JVM to unload every Geotk classes 
before to reload them when redeploying.

An attempt to mitigate the problem has been provided with the Setup.shutdown() 
<http://www.geotoolkit.org/apidocs/org/geotoolkit/lang/Setup.html#shutdown%28%29> static 
method, which can be invoked when you know that your application is about to be 
undeployed (if possible). However this does not solve all issues. We are 
investigating usage of JSR-330 and OSGi (now that Oracle confirmed that JDK-8 
will be compatible with OSGi) as a better fix (but we will not force user to use 
OSGi).

In the maintime the workaround proposed by Jon still the most reliable approach.

     Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20110525/481b307c/attachment.html


More information about the Geotoolkit mailing list