Geoserver heap size, permgen space configuration

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Geoserver heap size, permgen space configuration

Mehmet Demir
Hello
I'm using geoserver 2.5 and i'm loading lots of data with .sld files. And i get java.lang.OutOfMemoryError: Java heap space error. The computer i'm using has 8gb memory and i want to improve the memory usage of geoserver.

As i understand after some research, i can do this on the wrapper.conf file. Even i try to update some informations, i could't do it right i think.So how should i change the wrapper.conf file to obtain higher memory?

By the way, i'm using it on windows as a service.

Any help would be much appreciated.

Mehmet.

Here is my wrapper.conf file :


#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=%JAVA_HOME%/bin/java

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=wrapper/lib/wrapper.jar
wrapper.java.classpath.2=start.jar
wrapper.java.classpath.3=lib/*.jar

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=wrapper/lib

# Java Additional Parameters
wrapper.java.additional.1=-Djetty.home=.
wrapper.java.additional.2=-DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%"
wrapper.java.additional.3=-XX:MaxPermSize=128m

# Initial Java Heap Size (in MB)
wrapper.java.initmemory=16

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=128

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.mortbay.start.Main
wrapper.app.parameter.2=etc/jetty.xml

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=M

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=logs/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=GeoServer 2.5

# Display name of the service
wrapper.ntservice.displayname=GeoServer 2.5

# Description of the service
wrapper.ntservice.description=GeoServer is an open source software server written in Java that allows users to share and edit geospatial data.

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START (for Automatic) or DEMAND_START (for Manual)
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

# Run service as Network Service
# wrapper.ntservice.account=NT AUTHORITY\NetworkService
Reply | Threaded
Open this post in threaded view
|

Re: Geoserver heap size, permgen space configuration

Jerome A. Wendell

Mehmet,

 

You need to edit the following two sections of that file to work for your specific installation.  You can increase the two values based on the amount of memory that you have to use for GeoServer.  After you edit the file restart the GeoServer service.

 

# Initial Java Heap Size (in MB)

wrapper.java.initmemory=16

 

# Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=128

 

You can find information on optimizing the settings at the following link:

http://docs.geoserver.org/stable/en/user/production/container.html

 

According to the documentation here http://wrapper.tanukisoftware.com/doc/english/props-example-config.html

the settings wrapper.java.initmemory and wrapper.java.maxmemory seems the same thing as the typical java switches  -Xmx -Xms with a more friendly name.

 

Hope this helps.

 

Jerome Wendell

 

-----Original Message-----
From: Mehmet Demir [mailto:[hidden email]]
Sent: Thursday, June 12, 2014 1:57 PM
To: [hidden email]
Subject: [Geoserver-users] Geoserver heap size, permgen space configuration

 

Hello

I'm using geoserver 2.5 and i'm loading lots of data with .sld files. And i get java.lang.OutOfMemoryError: Java heap space error. The computer i'm using has 8gb memory and i want to improve the memory usage of geoserver.

 

As i understand after some research, i can do this on the wrapper.conf file.

Even i try to update some informations, i could't do it right i think.So how should i change the wrapper.conf file to obtain higher memory?

 

By the way, i'm using it on windows as a service.

 

Any help would be much appreciated.

 

Mehmet.

 

Here is my wrapper.conf file :

 

*

#********************************************************************

# Wrapper Properties

#********************************************************************

# Java Application

wrapper.java.command=%JAVA_HOME%/bin/java

 

# Java Main class.  This class must implement the WrapperListener interface #  or guarantee that the WrapperManager class is initialized.  Helper #  classes are provided to do this for you.  See the Integration section #  of the documentation for details.

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

 

# Java Classpath (include wrapper.jar)  Add class path elements as #  needed starting from 1 wrapper.java.classpath.1=wrapper/lib/wrapper.jar

wrapper.java.classpath.2=start.jar

wrapper.java.classpath.3=lib/*.jar

 

# Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=wrapper/lib

 

# Java Additional Parameters

wrapper.java.additional.1=-Djetty.home=.

wrapper.java.additional.2=-DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%"

wrapper.java.additional.3=-XX:MaxPermSize=128m

 

# Initial Java Heap Size (in MB)

wrapper.java.initmemory=16

 

# Maximum Java Heap Size (in MB)

wrapper.java.maxmemory=128

 

# Application parameters.  Add parameters as needed starting from 1 wrapper.app.parameter.1=org.mortbay.start.Main

wrapper.app.parameter.2=etc/jetty.xml

 

#********************************************************************

# Wrapper Logging Properties

#********************************************************************

# Format of output for the console.  (See docs for formats) wrapper.console.format=M

 

# Log Level for console output.  (See docs for log levels) wrapper.console.loglevel=INFO

 

# Log file to use for wrapper output logging.

wrapper.logfile=logs/wrapper.log

 

# Format of output for the log file.  (See docs for formats) wrapper.logfile.format=LPTM

 

# Log Level for log file output.  (See docs for log levels) wrapper.logfile.loglevel=INFO

 

# Maximum size that the log file will be allowed to grow to before #  the log is rolled. Size is specified in bytes.  The default value #  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or #  'm' (mb) suffix.  For example: 10m = 10 megabytes.

wrapper.logfile.maxsize=0

 

# Maximum number of rolled log files which will be allowed before old #  files are deleted.  The default value of 0 implies no limit.

wrapper.logfile.maxfiles=0

 

# Log Level for sys/event log output.  (See docs for log levels) wrapper.syslog.loglevel=NONE

 

#********************************************************************

# Wrapper NT Service Properties

#********************************************************************

# WARNING - Do not modify any of these properties when an application #  using this configuration file has been installed as a service.

#  Please uninstall the service before modifying this section.  The #  service can then be reinstalled.

 

# Name of the service

wrapper.ntservice.name=GeoServer 2.5

 

# Display name of the service

wrapper.ntservice.displayname=GeoServer 2.5

 

# Description of the service

wrapper.ntservice.description=GeoServer is an open source software server written in Java that allows users to share and edit geospatial data.

 

# Service dependencies.  Add dependencies as needed starting from 1 wrapper.ntservice.dependency.1=

 

# Mode in which the service is installed.  AUTO_START (for Automatic) or DEMAND_START (for Manual) wrapper.ntservice.starttype=AUTO_START

 

# Allow the service to interact with the desktop.

wrapper.ntservice.interactive=false

 

# Run service as Network Service

# wrapper.ntservice.account=NT AUTHORITY\NetworkService*

 

 

 

--

View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-heap-size-permgen-space-configuration-tp5145590.html

Sent from the GeoServer - User mailing list archive at Nabble.com.

 

------------------------------------------------------------------------------

HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.

Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________

Geoserver-users mailing list

[hidden email]

https://lists.sourceforge.net/lists/listinfo/geoserver-users


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Geoserver heap size, permgen space configuration

Mehmet Demir
Thank you Jerome.

 I will configure the file as :

 # Initial Java Heap Size (in MB)
 wrapper.java.initmemory=1024

 # Maximum Java Heap Size (in MB)
  wrapper.java.maxmemory=2048

Best Regards, Mehmet

Reply | Threaded
Open this post in threaded view
|

Re: Geoserver heap size, permgen space configuration

Simone Giannecchini
In reply to this post by Mehmet Demir
Ciao Mehmet,
I see you on Windows, I would consider using Tomcat and deploy the
GeoServer in it rather than using the provided
binary based on Jetty.


Regards,
Simone Giannecchini
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.
==

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
mob:   +39  333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------


On Thu, Jun 12, 2014 at 7:57 PM, Mehmet Demir <[hidden email]> wrote:

> Hello
> I'm using geoserver 2.5 and i'm loading lots of data with .sld files. And i
> get java.lang.OutOfMemoryError: Java heap space error. The computer i'm
> using has 8gb memory and i want to improve the memory usage of geoserver.
>
> As i understand after some research, i can do this on the wrapper.conf file.
> Even i try to update some informations, i could't do it right i think.So how
> should i change the wrapper.conf file to obtain higher memory?
>
> By the way, i'm using it on windows as a service.
>
> Any help would be much appreciated.
>
> Mehmet.
>
> Here is my wrapper.conf file :
>
> *
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> # Java Application
> wrapper.java.command=%JAVA_HOME%/bin/java
>
> # Java Main class.  This class must implement the WrapperListener interface
> #  or guarantee that the WrapperManager class is initialized.  Helper
> #  classes are provided to do this for you.  See the Integration section
> #  of the documentation for details.
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
>
> # Java Classpath (include wrapper.jar)  Add class path elements as
> #  needed starting from 1
> wrapper.java.classpath.1=wrapper/lib/wrapper.jar
> wrapper.java.classpath.2=start.jar
> wrapper.java.classpath.3=lib/*.jar
>
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> wrapper.java.library.path.1=wrapper/lib
>
> # Java Additional Parameters
> wrapper.java.additional.1=-Djetty.home=.
> wrapper.java.additional.2=-DGEOSERVER_DATA_DIR="%GEOSERVER_DATA_DIR%"
> wrapper.java.additional.3=-XX:MaxPermSize=128m
>
> # Initial Java Heap Size (in MB)
> wrapper.java.initmemory=16
>
> # Maximum Java Heap Size (in MB)
> wrapper.java.maxmemory=128
>
> # Application parameters.  Add parameters as needed starting from 1
> wrapper.app.parameter.1=org.mortbay.start.Main
> wrapper.app.parameter.2=etc/jetty.xml
>
> #********************************************************************
> # Wrapper Logging Properties
> #********************************************************************
> # Format of output for the console.  (See docs for formats)
> wrapper.console.format=M
>
> # Log Level for console output.  (See docs for log levels)
> wrapper.console.loglevel=INFO
>
> # Log file to use for wrapper output logging.
> wrapper.logfile=logs/wrapper.log
>
> # Format of output for the log file.  (See docs for formats)
> wrapper.logfile.format=LPTM
>
> # Log Level for log file output.  (See docs for log levels)
> wrapper.logfile.loglevel=INFO
>
> # Maximum size that the log file will be allowed to grow to before
> #  the log is rolled. Size is specified in bytes.  The default value
> #  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
> #  'm' (mb) suffix.  For example: 10m = 10 megabytes.
> wrapper.logfile.maxsize=0
>
> # Maximum number of rolled log files which will be allowed before old
> #  files are deleted.  The default value of 0 implies no limit.
> wrapper.logfile.maxfiles=0
>
> # Log Level for sys/event log output.  (See docs for log levels)
> wrapper.syslog.loglevel=NONE
>
> #********************************************************************
> # Wrapper NT Service Properties
> #********************************************************************
> # WARNING - Do not modify any of these properties when an application
> #  using this configuration file has been installed as a service.
> #  Please uninstall the service before modifying this section.  The
> #  service can then be reinstalled.
>
> # Name of the service
> wrapper.ntservice.name=GeoServer 2.5
>
> # Display name of the service
> wrapper.ntservice.displayname=GeoServer 2.5
>
> # Description of the service
> wrapper.ntservice.description=GeoServer is an open source software server
> written in Java that allows users to share and edit geospatial data.
>
> # Service dependencies.  Add dependencies as needed starting from 1
> wrapper.ntservice.dependency.1=
>
> # Mode in which the service is installed.  AUTO_START (for Automatic) or
> DEMAND_START (for Manual)
> wrapper.ntservice.starttype=AUTO_START
>
> # Allow the service to interact with the desktop.
> wrapper.ntservice.interactive=false
>
> # Run service as Network Service
> # wrapper.ntservice.account=NT AUTHORITY\NetworkService*
>
>
>
> --
> View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-heap-size-permgen-space-configuration-tp5145590.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Geoserver heap size, permgen space configuration

Mehmet Demir
Hello Simon,
After some research i deployed geoserver with Tomcat as you say and it's much better now thanks for help and informations.

For the ones who have same problem, here is tutorial to deploy geoserver with tomcat :
http://www.packtpub.com/article/getting-started-with-geoServer

Best Regards, Mehmet