[Geoserver-users] OutOfMemoryError running in Tomcat

Hello, I’m running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread “http-8080-Processor25” java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS=“-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC”

Any advice please? Thank you very much.

Juan Manuel Sánchez Martagón ha scritto:

Hello, I'm running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread "http-8080-Processor25" java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS="-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC"

Any advice please? Thank you very much.

There has been a similar thread some time ago:
http://www.nabble.com/Apache-Tomcat-crashing…-td18988481.html

but in the end I don't think it provided much of a solution, it
seems to be related to system level issues.

What you can try is to:
- upgrade the java virtual machine to 1.6.0_14
- reduce the -Xmx and -Xmx to lower values (512M) and definitely
   reduce the perm size, seems quite a bit too wide

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hello, I’ve tried changing this paramters but it goes on crashing :frowning:

One more question. JAI libs could be realated to the problem? I’ve been thinking that JAI only are used to render coverages but I’m not sure now.

Thanks.

El 6 de julio de 2009 15:10, Andrea Aime <aaime@anonymised.com> escribió:

Juan Manuel Sánchez Martagón ha scritto:

Hello, I’m running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread “http-8080-Processor25” java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS=“-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC”

Any advice please? Thank you very much.

There has been a similar thread some time ago:
http://www.nabble.com/Apache-Tomcat-crashing…-td18988481.html

but in the end I don’t think it provided much of a solution, it
seems to be related to system level issues.

What you can try is to:

  • upgrade the java virtual machine to 1.6.0_14
  • reduce the -Xmx and -Xmx to lower values (512M) and definitely
    reduce the perm size, seems quite a bit too wide

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi

I set some additional jvm options:

JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC "
JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled "
JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled "

regards
Stefan

----- Originalnachricht -----
Von: Juan Manuel Sánchez Martagón <peruxho@anonymised.com>
Gesendet: Die, 7.7.2009 09:37
An: Andrea Aime <aaime@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] OutOfMemoryError running in Tomcat

Hello, I've tried changing this paramters but it goes on crashing :frowning:

One more question. JAI libs could be realated to the problem? I've been thinking that JAI only are used to render coverages but I'm not sure now.

Thanks.

El 6 de julio de 2009 15:10, Andrea Aime <aaime@anonymised.com> escribió:

Juan Manuel Sánchez Martagón ha scritto:

Hello, I'm running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread "http-8080-Processor25" java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS="-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC"

Any advice please? Thank you very much.

There has been a similar thread some time ago:

http://www.nabble.com/Apache-Tomcat-crashing…-td18988481.html

but in the end I don't think it provided much of a solution, it

seems to be related to system level issues.

What you can try is to:

- upgrade the java virtual machine to 1.6.0_14

- reduce the -Xmx and -Xmx to lower values (512M) and definitely

  reduce the perm size, seems quite a bit too wide

Cheers

Andrea

--

Andrea Aime

OpenGeo - http://opengeo.org

Expert service straight from the developers.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ziegler Stefan ha scritto:

Hi

I set some additional jvm options:

JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC "
JAVA_OPTS="$JAVA_OPTS -XX:+CMSPermGenSweepingEnabled "
JAVA_OPTS="$JAVA_OPTS -XX:+CMSClassUnloadingEnabled "

Ah, right, these help in avoiding issue with redeploys: Tomcat leaks
memory in the perm gen at each redeploy and the above allows the
VM to reclaim that space, using the parallel collector that is not
allowed instead.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

what’s about jai?

El 7 de julio de 2009 09:37, Juan Manuel Sánchez Martagón <peruxho@anonymised.com> escribió:

Hello, I’ve tried changing this paramters but it goes on crashing :frowning:

One more question. JAI libs could be realated to the problem? I’ve been thinking that JAI only are used to render coverages but I’m not sure now.

Thanks.

El 6 de julio de 2009 15:10, Andrea Aime <aaime@anonymised.com> escribió:

Juan Manuel Sánchez Martagón ha scritto:

Hello, I’m running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread “http-8080-Processor25” java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS=“-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC”

Any advice please? Thank you very much.

There has been a similar thread some time ago:
http://www.nabble.com/Apache-Tomcat-crashing…-td18988481.html

but in the end I don’t think it provided much of a solution, it
seems to be related to system level issues.

What you can try is to:

  • upgrade the java virtual machine to 1.6.0_14
  • reduce the -Xmx and -Xmx to lower values (512M) and definitely
    reduce the perm size, seems quite a bit too wide

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi,

I’ve the same problems running in a similar environment in Windows. I tested with other layers (example layers, shapefiles, oracle, …), always with the same results: Geoserver crashes beacause OutOfMemory problems. I wonder if anybody works with so reduced envelopes (near 100 x 100 m). Must I restrict them? Are they support by Geoserver?

Thanks

El 8 de julio de 2009 10:26, Juan Manuel Sánchez Martagón <peruxho@anonymised.com> escribió:

what’s about jai?

El 7 de julio de 2009 09:37, Juan Manuel Sánchez Martagón <peruxho@anonymised.com> escribió:

Hello, I’ve tried changing this paramters but it goes on crashing :frowning:

One more question. JAI libs could be realated to the problem? I’ve been thinking that JAI only are used to render coverages but I’m not sure now.

Thanks.

El 6 de julio de 2009 15:10, Andrea Aime <aaime@anonymised.com> escribió:

Juan Manuel Sánchez Martagón ha scritto:

Hello, I’m running Geoserver in a Tomcat 5.5.27 instance deployed in a Red Hat Server with 2Gb of memory and JDK 1.5.

Surprisingly, geoserver crashes after a few request, specially when the requested envelope is small (near 100m X 100m).

The exception is: Exception in thread “http-8080-Processor25” java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?

and the catalina.sh script for run tomcat has the next options (as I read on: http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment)

JAVA_OPTS=“-Djava.awt.headless=true -server -Xms1000M -Xmx1000M -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:PermSize=500M -XX:MaxPermSize=500M -XX:+UseParallelGC”

Any advice please? Thank you very much.

There has been a similar thread some time ago:
http://www.nabble.com/Apache-Tomcat-crashing…-td18988481.html

but in the end I don’t think it provided much of a solution, it
seems to be related to system level issues.

What you can try is to:

  • upgrade the java virtual machine to 1.6.0_14
  • reduce the -Xmx and -Xmx to lower values (512M) and definitely
    reduce the perm size, seems quite a bit too wide

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Juan Manuel Sánchez Martagón ha scritto:

Hi,

I've the same problems running in a similar environment in Windows. I tested with other layers (example layers, shapefiles, oracle, .....), always with the same results: Geoserver crashes beacause OutOfMemory problems. I wonder if anybody works with so reduced envelopes (near 100 x 100 m). Must I restrict them? Are they support by Geoserver?

I'm wondering if you're being hit by http://jira.codehaus.org/browse/GEOT-2538

If so, try downloading http://sigma.openplans.org/~aaime/gt-api-2.5.6.jar
and replacing the same file you find in the GeoServer install (this
patch works if you're using GeoServer 1.7.5, not sure what your version is).

As for being able to set limits on the size of the WMS requests,
1.7.5 has some parameters you can set documented here:
http://gridlock.openplans.org/geoserver/1.7.x/doc/user/services/wms/configuration.html#request-limits

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi, it works much better and there are no requests for exceptions to 25m (width) but I have to pass more tests.

Thank you very much

El 8 de julio de 2009 15:03, Andrea Aime <aaime@anonymised.com> escribió:

Juan Manuel Sánchez Martagón ha scritto:

Hi,

I’ve the same problems running in a similar environment in Windows. I tested with other layers (example layers, shapefiles, oracle, …), always with the same results: Geoserver crashes beacause OutOfMemory problems. I wonder if anybody works with so reduced envelopes (near 100 x 100 m). Must I restrict them? Are they support by Geoserver?

I’m wondering if you’re being hit by http://jira.codehaus.org/browse/GEOT-2538

If so, try downloading http://sigma.openplans.org/~aaime/gt-api-2.5.6.jar
and replacing the same file you find in the GeoServer install (this
patch works if you’re using GeoServer 1.7.5, not sure what your version is).

As for being able to set limits on the size of the WMS requests,
1.7.5 has some parameters you can set documented here:
http://gridlock.openplans.org/geoserver/1.7.x/doc/user/services/wms/configuration.html#request-limits

Cheers
Andrea


Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.