Saturday 28 September 2019

Avoiding GeoServer/Java out of heap space error?


I'm new to Geoserver, Ubuntu and Java, but have downloaded a virtual machine from gisvm.com and am getting up to speed. I got as far as configuring it with some fairly large shapefiles from a project I've worked on previously.


My question is related to a problem which I see if I show the shapefile using the OpenLayers layer preview option. I see an error:




OpenLayers map preview code="internalError" Rendering process failed. java.lang.OutOfMemoryError: Java heap space



Googling has led me to plenty of Java command line options to increase heap space, but I have no idea if this should be applied to an environment variable, in a startup script or as a part of the Geoserver config.


Can you help me to understand what I need to edit to get this working?


I'm also wondering if I should be splitting my shapefile into smaller pieces.



Answer



You must change memory heap in your JVM. I supposed that gisvm.com use Tomcat, so you can find a lot of tutorials about "increase java heap space in Tomcat" in google. Basically is add -Xmx128m parameter to JVM to increasing memory heap.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...