[GeoNetwork-devel] GeoNetwork 2.4.1 OutOfMemoryError on Tomcat 5.5 (JDK 1.5.0_17, 1024MB max memory pool)

I almost can get GeoNetwork 2.4.1 to work perfectly in Tomcat 5.5 (JDK 1.5.0_17, Initial memory pool 245MB, Maximum memory pool: 1024MB) on Windows XP (3GB RAM, Core 2 Duo).

Sadly, Intermap returns OutOfMemoryError (see error report below) under two repeatable conditions:
1) by clicking on the "Open Map Viewer" link. The little base map in Geonetwork works well.
2) Playing with the map in http://localhost:8080/intermap after having done a search and metadata display in GeoNetwork. Intermap appears to be OK if I don't don't do any metadata display first.

Increasing the memory pool to 1200MB does make the "Open Map Viewer" work but any subsequent metadata display generates OutOfMemoryError in Geonetwork.
I can't make my Tomcat service start with more than 1200MB max memory pool. Is ther some memory leak or garbage collection problem?

A 1024MB memory pool should be more than enough according to the documentation and Jetty works fine with much less.
Am I missing something else or does GeoNetwork on Tomcat just need ridiculous amounts of memory.

Ciao, Wolfgang

2009-10-08 12:59:21,836 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /intermap/srv/en/map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Method : GET
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Content type : null
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Accept : text/javascript, text/html, application/xml, text/xml, */*
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Session id is F819A2452C8C934B7F344F9203A7A7DD
2009-10-08 12:59:21,836 INFO [jeeves.service] - Dispatching : map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.service] - -> no input parameters
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> dispatching to output for : map.getMain.embedded
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> transforming with stylesheet : C:\Tomcat5527\webapps\intermap\/xsl/index-embedded.xsl
2009-10-08 12:59:25,399 DEBUG [jeeves.service] - Raised exception while executing service
<error id="error">
  <message>PermGen space</message>
  <class>OutOfMemoryError</class>
  <stack>
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="-2" method="defineClass1" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="620" method="defineClass" />
    <at class="java.security.SecureClassLoader" file="SecureClassLoader.java" line="124" method="defineClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader" file="WebappClassLoader.java" line="1876" method="findClassInternal" />
    <at class="org.apache.catalina.loader.WebappClassLoader" file="WebappClassLoader.java" line="889" method="findClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader" file="WebappClassLoader.java" line="1353" method="loadClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader" file="WebappClassLoader.java" line="1232" method="loadClass" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="319" method="loadClassInternal" />
    <at class="net.sf.saxon.pattern.Pattern" file="Pattern.java" line="40" method="make" />
    <at class="net.sf.saxon.style.StyleElement" file="StyleElement.java" line="502" method="makePattern" />
  </stack>

--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500

Hi Wolfgang,

GeoNetwork on tomcat doesn't need a ridiculous amount of memory! :slight_smile: Your error message indicates you need to increase the size of the memory allocated to the permanent generation (seems like you've been increasing general heap space which won't fix this).

Use:

-XX:MaxPermSize=128m

option when you start the service in tomcat.

I think 2.4.1 comes with 128m set by default but that is set in the jetty startup script and you probably haven't got that in your tomcat service startup.

Doing some searches on "PermGen error" should bring descriptions of what the permanent generation is etc.

Cheers,
Simon
________________________________________
From: Wolfgang Grunberg [wgrunberg@anonymised.com]
Sent: Friday, 9 October 2009 8:05 AM
To: GeoNetwork-devel@lists.sourceforge.net
Subject: [GeoNetwork-devel] GeoNetwork 2.4.1 OutOfMemoryError on Tomcat 5.5 (JDK 1.5.0_17, 1024MB max memory pool)

I almost can get GeoNetwork 2.4.1 to work perfectly in Tomcat 5.5 (JDK
1.5.0_17, Initial memory pool 245MB, Maximum memory pool: 1024MB) on
Windows XP (3GB RAM, Core 2 Duo).

Sadly, Intermap returns OutOfMemoryError (see error report below) under
two repeatable conditions:
1) by clicking on the "Open Map Viewer" link. The little base map in
Geonetwork works well.
2) Playing with the map in http://localhost:8080/intermap after having
done a search and metadata display in GeoNetwork. Intermap appears to be
OK if I don't don't do any metadata display first.

Increasing the memory pool to 1200MB does make the "Open Map Viewer"
work but any subsequent metadata display generates OutOfMemoryError in
Geonetwork.
I can't make my Tomcat service start with more than 1200MB max memory
pool. Is ther some memory leak or garbage collection problem?

A 1024MB memory pool should be more than enough according to the
documentation and Jetty works fine with much less.
Am I missing something else or does GeoNetwork on Tomcat just need
ridiculous amounts of memory.

Ciao, Wolfgang

2009-10-08 12:59:21,836 INFO [jeeves.request] - HTML Request (from
127.0.0.1) : /intermap/srv/en/map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Method : GET
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Content type : null
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Session id is
F819A2452C8C934B7F344F9203A7A7DD
2009-10-08 12:59:21,836 INFO [jeeves.service] - Dispatching :
map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.service] - -> no input parameters
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> dispatching to
output for : map.getMain.embedded
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> transforming
with stylesheet : C:\Tomcat5527\webapps\intermap\/xsl/index-embedded.xsl
2009-10-08 12:59:25,399 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
  <message>PermGen space</message>
  <class>OutOfMemoryError</class>
  <stack>
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="-2"
method="defineClass1" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="620"
method="defineClass" />
    <at class="java.security.SecureClassLoader"
file="SecureClassLoader.java" line="124" method="defineClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1876" method="findClassInternal" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="889" method="findClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1353" method="loadClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1232" method="loadClass" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="319"
method="loadClassInternal" />
    <at class="net.sf.saxon.pattern.Pattern" file="Pattern.java"
line="40" method="make" />
    <at class="net.sf.saxon.style.StyleElement" file="StyleElement.java"
line="502" method="makePattern" />
  </stack>

--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!

_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net

GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Unbelievable: Adding the "-XX:MaxPermSize=128m" Java option to the Tomcat service did not just fix my problem, GeoNetwork appears snappier too.
Thank you Simon!

_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500

Simon.Pigot@anonymised.com wrote:

Hi Wolfgang,

GeoNetwork on tomcat doesn't need a ridiculous amount of memory! :slight_smile: Your error message indicates you need to increase the size of the memory allocated to the permanent generation (seems like you've been increasing general heap space which won't fix this).

Use:

-XX:MaxPermSize=128m

option when you start the service in tomcat.

I think 2.4.1 comes with 128m set by default but that is set in the jetty startup script and you probably haven't got that in your tomcat service startup.

Doing some searches on "PermGen error" should bring descriptions of what the permanent generation is etc.

Cheers,
Simon
________________________________________
From: Wolfgang Grunberg [wgrunberg@anonymised.com]
Sent: Friday, 9 October 2009 8:05 AM
To: GeoNetwork-devel@lists.sourceforge.net
Subject: [GeoNetwork-devel] GeoNetwork 2.4.1 OutOfMemoryError on Tomcat 5.5 (JDK 1.5.0_17, 1024MB max memory pool)

I almost can get GeoNetwork 2.4.1 to work perfectly in Tomcat 5.5 (JDK
1.5.0_17, Initial memory pool 245MB, Maximum memory pool: 1024MB) on
Windows XP (3GB RAM, Core 2 Duo).

Sadly, Intermap returns OutOfMemoryError (see error report below) under
two repeatable conditions:
1) by clicking on the "Open Map Viewer" link. The little base map in
Geonetwork works well.
2) Playing with the map in http://localhost:8080/intermap after having
done a search and metadata display in GeoNetwork. Intermap appears to be
OK if I don't don't do any metadata display first.

Increasing the memory pool to 1200MB does make the "Open Map Viewer"
work but any subsequent metadata display generates OutOfMemoryError in
Geonetwork.
I can't make my Tomcat service start with more than 1200MB max memory
pool. Is ther some memory leak or garbage collection problem?

A 1024MB memory pool should be more than enough according to the
documentation and Jetty works fine with much less.
Am I missing something else or does GeoNetwork on Tomcat just need
ridiculous amounts of memory.

Ciao, Wolfgang

2009-10-08 12:59:21,836 INFO [jeeves.request] - HTML Request (from
127.0.0.1) : /intermap/srv/en/map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Method : GET
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Content type : null
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Accept :
text/javascript, text/html, application/xml, text/xml, */*
2009-10-08 12:59:21,836 DEBUG [jeeves.request] - Session id is
F819A2452C8C934B7F344F9203A7A7DD
2009-10-08 12:59:21,836 INFO [jeeves.service] - Dispatching :
map.getMain.embedded
2009-10-08 12:59:21,836 DEBUG [jeeves.service] - -> no input parameters
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> dispatching to
output for : map.getMain.embedded
2009-10-08 12:59:21,836 INFO [jeeves.service] - -> transforming
with stylesheet : C:\Tomcat5527\webapps\intermap\/xsl/index-embedded.xsl
2009-10-08 12:59:25,399 DEBUG [jeeves.service] - Raised exception while
executing service
<error id="error">
  <message>PermGen space</message>
  <class>OutOfMemoryError</class>
  <stack>
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="-2"
method="defineClass1" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="620"
method="defineClass" />
    <at class="java.security.SecureClassLoader"
file="SecureClassLoader.java" line="124" method="defineClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1876" method="findClassInternal" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="889" method="findClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1353" method="loadClass" />
    <at class="org.apache.catalina.loader.WebappClassLoader"
file="WebappClassLoader.java" line="1232" method="loadClass" />
    <at class="java.lang.ClassLoader" file="ClassLoader.java" line="319"
method="loadClassInternal" />
    <at class="net.sf.saxon.pattern.Pattern" file="Pattern.java"
line="40" method="make" />
    <at class="net.sf.saxon.style.StyleElement" file="StyleElement.java"
line="502" method="makePattern" />
  </stack>

--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Howdy all,

We're running 2.6.3 on Debian with Tomcat 6.0.29. The box has 1.7Gb of
memory.

Getting the OutOfMemoryError : PermGen space error on a regular basis.

Advice is: -XX:MaxPermSize=128m

Can you clarify where/how to investigate the current memory settings and if
this advice for allocation is going to be relevant with 2.6.3/OpenLayers vs
the original post's context (2.4.1/Intermap)?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoNetwork-2-4-1-OutOfMemoryError-on-Tomcat-5-5-JDK-1-5-0-17-1024MB-max-memory-pool-tp3790814p6274847.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

And the 'debian specific' way to put that in is in /etc/default/tomcat(5.5|6)

Uncomment your JAVA_OPTS and add that string in there.

Restart tomcat and your done!

Terry

-----Original Message-----
From: boabjohn [mailto:john@anonymised.com]
Sent: Friday, 15 April 2011 8:33 AM
To: geonetwork-devel@lists.sourceforge.net
Subject: Re: [GeoNetwork-devel] GeoNetwork 2.4.1 OutOfMemoryError on Tomcat 5.5 (JDK 1.5.0_17, 1024MB max memory pool)

Howdy all,

We're running 2.6.3 on Debian with Tomcat 6.0.29. The box has 1.7Gb of
memory.

Getting the OutOfMemoryError : PermGen space error on a regular basis.

Advice is: -XX:MaxPermSize=128m

Can you clarify where/how to investigate the current memory settings and if
this advice for allocation is going to be relevant with 2.6.3/OpenLayers vs
the original post's context (2.4.1/Intermap)?

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoNetwork-2-4-1-OutOfMemoryError-on-Tomcat-5-5-JDK-1-5-0-17-1024MB-max-memory-pool-tp3790814p6274847.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork