[GIS] Boundless Opengeo Suite: Geoserver fails to launch due to Java heap size

boundless-suitegeoserverjetty

When I go to start Boundless OpenGeo Suite 3.1 from the OpenGeo Suite Dashboard, Geoserver will launch if I point it to the default geoserver data_dir, but when I point it to mine, which I have used successfully for > 8 months, javaw.exe fills all remaining memory on the machine and Geoserver fails to launch. I am having some trouble interpreting the logs to find the cause of this issue; does anybody know how I might go about finding and fixing the problem?

I am new to this community, so if there is any way that I can improve this submission, please let me know and I'd be happy to fix it.

Steps taken:

  • Restarted Machine
  • Uninstalled/Reinstalled OpenGeo Suite
  • Pointed Geoserver to the default data_dir

Machine:

  • Windows Server 2003 Service Pack 2
  • AMD Opteron 280 2.41GHz
  • 3.83 GB RAM

Startup Log (first block):

----------------------------------
- GEOSERVER_DATA_DIR: e:\path_to_install\data_dir
----------------------------------
2014-06-11 16:13:58,423 WARN [referencing.factory] - Axis elements found in a wkt definition, the force longitude first axis order hint might not be respected:
PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator_1SP_Google"], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST], AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]


2014-06-11 16:14:02,033 WARN [org.geoserver] - Ignoring store directory 'layergroups'

2014-06-11 16:14:02,595 WARN [org.geoserver] - Ignoring store directory 'styles'

2014-06-11 16:14:04,282 WARN [org.geoserver] - Error connecting to 'Taxlots'. Disabling.

2014-06-11 16:14:04,876 WARN [org.geoserver] - Ignoring store directory 'styles'

2014-06-11 16:14:07,439 WARN [org.geoserver] - Ignoring store directory 'layergroups'

2014-06-11 16:14:07,439 WARN [org.geoserver] - Ignoring store directory 'styles'

2014-06-11 16:14:07,501 ERROR [geotools.jdbc] - There's code using JDBC based datastore and not disposing them. This may lead to temporary loss of database connections. Please make sure all data access code calls DataStore.dispose() before freeing all references to it

2014-06-11 16:14:08,829 WARN [org.geoserver] - Ignoring store directory 'styles'

2014-06-11 16:14:09,454 WARN [org.geoserver] - Ignoring store directory 'styles'

2014-06-11 16:15:04,873 WARN [support.DisposableBeanAdapter] - Invocation of destroy 
method failed on bean with name 'geoServerLoader': java.lang.NullPointerException

2014-06-11 16:15:04,873 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcFacade' defined in URL [jar:file:/E:/path_to_install/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/gwc-2.2-SNAPSHOT.jar!/applicationContext.xml]: Cannot resolve reference to bean 'gwcStorageBroker' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcStorageBroker' defined in URL [jar:file:/E:/path_to_install/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/gwc-2.2-SNAPSHOT.jar!/geowebcache-core-context.xml]: Cannot resolve reference to bean 'gwcMetaStore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcMetaStore' defined in URL [jar:file:/E:/path_to_install/OpenGeo%20Suite/webapps/geoserver/WEB-INF/lib/gwc-2.2-SNAPSHOT.jar!/geowebcache-core-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.geowebcache.storage.metastore.jdbc.JDBCMetaBackend]: Constructor threw exception; nested exception is java.lang.OutOfMemoryError: Java heap space

Best Answer

I was able to resolve the issue.

The memory error was occurring while the gwcMetaStore was being created. The box would run out of memory while these classes were being created because the cache had gotten too large.

Steps to fix:

  • Since the services wouldn't initialize, I could not use the geowebcache REST API to truncate the cache.
  • Backed up data_dir to local machine for safety.
  • Reinstalled OpenGeo Suite
  • Replaced the gwc/ and gwc_layers/ directories in data_dir/ with those from the fresh install
  • Pointed the new install back to data_dir/
  • To prevent this from happening again, I enabled disk quota on geowebcache and set an appropriate max size
Related Question