I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
I’ve mimicked the settings of both servers and all seems to work OK, except for GWC.
When I want to seed a layer I’m getting errors about ‘java.lang.OutOfMemoryError: Java heap space’ in the log.
I’m still a novice when it comes to Ubuntu and Java and it took me a long time and a lot of trial-and-error before I got my other server working. I had hoped using the same settings would help me out.
My question to you all is. What and where do I need to change to prevent heap space errors and get my GWC up and running? Is this a setting in Tomcat7 or in Geoserver/GWC?
Thanks,
Paul
Hi,
http://docs.geoserver.org/stable/en/user/production/container.html
some JVM parameters you might want to try out.
regards,
Imran
On Sun, Feb 10, 2013 at 4:23 AM, Paul Meems <bontepaarden@anonymised.com> wrote:
I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
I’ve mimicked the settings of both servers and all seems to work OK, except for GWC.
When I want to seed a layer I’m getting errors about ‘java.lang.OutOfMemoryError: Java heap space’ in the log.
I’m still a novice when it comes to Ubuntu and Java and it took me a long time and a lot of trial-and-error before I got my other server working. I had hoped using the same settings would help me out.
My question to you all is. What and where do I need to change to prevent heap space errors and get my GWC up and running? Is this a setting in Tomcat7 or in Geoserver/GWC?
Thanks,
Paul
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
I.R
Thanks Imran,
In /usr/share/tomcat7/bin/setenv.sh I have the following:
-server -Xms512m -Xmx1024m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=36000
-XX:+UseParallelOldGC -XX:+UseParallelGC
-XX:NewRatio=2 -XX:+AggressiveOpt
This is working on my first server but not on my new server with GSv2.2.4 and Oracle-Java.
Perhaps I’m not setting it correctly?
On both servers I have installed the native JAI and JAI Image I/O extensions.
I also noticed that tomcat7 is not starting after a reboot of the server. I have to manually start it.
Perhaps I did not install tomcat7 correctly?
···
Thanks,
Paul
2013/2/10 Imran Rajjad <rajjad@anonymised.com…>
Hi,
http://docs.geoserver.org/stable/en/user/production/container.html
some JVM parameters you might want to try out.
regards,
Imran
On Sun, Feb 10, 2013 at 4:23 AM, Paul Meems <bontepaarden@anonymised.com> wrote:
I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
I’ve mimicked the settings of both servers and all seems to work OK, except for GWC.
When I want to seed a layer I’m getting errors about ‘java.lang.OutOfMemoryError: Java heap space’ in the log.
I’m still a novice when it comes to Ubuntu and Java and it took me a long time and a lot of trial-and-error before I got my other server working. I had hoped using the same settings would help me out.
My question to you all is. What and where do I need to change to prevent heap space errors and get my GWC up and running? Is this a setting in Tomcat7 or in Geoserver/GWC?
Thanks,
Paul
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
I.R
On Sun, Feb 10, 2013 at 12:23 AM, Paul Meems <bontepaarden@anonymised.com> wrote:
I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
This is unrelated to the problems you’re seeing, but I’d discourage using Java 7 with the
GeoServer 2.2.x series, there are a few little things here and there that do not work
as expected due to changes in how the library manages maps (as in, key/value pairs
collections).
The first series that received minimal attention vs java 7 is 2.3.x, even thought the main target
JDK for it is still Java 6
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Thanks Andrea,
I can set up a new server with Oracle-Java-6.
What would be the best settings in my setenv.sh file when I have 2GB RAM and 80GB Disk?
On my current server with Oracle-Java-7, I’ve tried changing -Xmx1024m to -Xmx512m and to -Xmx1536m, in both cases I get an out of memory (java heap space).
Do I need to change a different settings to increase the heap space?
···
Java and I are not best friends 
Thanks,
Paul
2013/2/10 Andrea Aime <andrea.aime@anonymised.com>
On Sun, Feb 10, 2013 at 12:23 AM, Paul Meems <bontepaarden@anonymised.com> wrote:
I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
This is unrelated to the problems you’re seeing, but I’d discourage using Java 7 with the
GeoServer 2.2.x series, there are a few little things here and there that do not work
as expected due to changes in how the library manages maps (as in, key/value pairs
collections).
The first series that received minimal attention vs java 7 is 2.3.x, even thought the main target
JDK for it is still Java 6
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
On Sun, Feb 10, 2013 at 4:33 PM, Paul Meems <bontepaarden@anonymised.com> wrote:
Thanks Andrea,
I can set up a new server with Oracle-Java-6.
What would be the best settings in my setenv.sh file when I have 2GB RAM and 80GB Disk?
On my current server with Oracle-Java-7, I’ve tried changing -Xmx1024m to -Xmx512m and to -Xmx1536m, in both cases I get an out of memory (java heap space).
Do I need to change a different settings to increase the heap space?
Hum, with so little RAM 512m is probably better, to leave some space for file caching. But I guess the settings are not
being picked up by Tomcat, otherwise you’d not get a OOM so soon
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Thanks Andrea,
I did a more searching and it seems I misunderstood what to write in the setenv.sh file.
I deleted all content and paste these lines:
CATALINA_OPTS=“$CATALINA_OPTS -server -Xms256m -Xmx512m”
CATALINA_OPTS=“$CATALINA_OPTS -XX:SoftRefLRUPolicyMSPerMB=36000”
Using ps aux|grep jar I can now see Tomcat is using my settings instead of the default settings.
I’m seeding now (finally) 
Thanks for all your help. It were again days I’ve learned a lot.
···
Paul
2013/2/10 Andrea Aime <andrea.aime@anonymised.com>
On Sun, Feb 10, 2013 at 4:33 PM, Paul Meems <bontepaarden@anonymised.com> wrote:
Thanks Andrea,
I can set up a new server with Oracle-Java-6.
What would be the best settings in my setenv.sh file when I have 2GB RAM and 80GB Disk?
On my current server with Oracle-Java-7, I’ve tried changing -Xmx1024m to -Xmx512m and to -Xmx1536m, in both cases I get an out of memory (java heap space).
Do I need to change a different settings to increase the heap space?
Hum, with so little RAM 512m is probably better, to leave some space for file caching. But I guess the settings are not
being picked up by Tomcat, otherwise you’d not get a OOM so soon
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
This is probably worth putting in the documentation somewhere.
This page - http://docs.geoserver.org/stable/en/user/installation/windows/binary.html#setting-environment-variables
and - http://docs.geoserver.org/stable/en/user/production/java.html#production-java
Both say something to the effect of: “For best performance, use Oracle JRE 6 (also known as JRE 1.6) or newer.”
Which implies Java 7 is fine.
For reference - Java 8 is due out later this year - https://en.wikipedia.org/wiki/Java_8#Java_SE _8 - so its probably worth specifying exactly which major version of Java GeoServer best supports.
Jonathan
On 10 February 2013 08:11, Andrea Aime <andrea.aime@anonymised.com…> wrote:
On Sun, Feb 10, 2013 at 12:23 AM, Paul Meems <bontepaarden@anonymised.com> wrote:
I’ve set up a new Ubuntu cloud server with 2GB RAM.
I also have another server with the same configuration, but running OpenJDK and GS 2.2.1
On my new server I use GS 2.2.4 and Oracle-Java-7.
This is unrelated to the problems you’re seeing, but I’d discourage using Java 7 with the
GeoServer 2.2.x series, there are a few little things here and there that do not work
as expected due to changes in how the library manages maps (as in, key/value pairs
collections).
The first series that received minimal attention vs java 7 is 2.3.x, even thought the main target
JDK for it is still Java 6
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.