Some non-expert advise:

Your stack trace basically says that geoserver is extracting 1 tile / PNG file 
from the geopkg, and it is too big:

at java.desktop/java.awt.image.DataBufferByte.<init>(DataBufferByte.java:92)
at 
java.desktop/java.awt.image.ComponentSampleModel.createDataBuffer(ComponentSampleModel.java:439)
at java.desktop/java.awt.image.Raster.createWritableRaster(Raster.java:1005)
at 
java.desktop/javax.imageio.ImageTypeSpecifier.createBufferedImage(ImageTypeSpecifier.java:1074)
at java.desktop/javax.imageio.ImageReader.getDestination(ImageReader.java:2877)
at 
java.desktop/com.sun.imageio.plugins.png.PNGImageReader.readImage(PNGImageReader.java:1469)


An uncompressed image, being width times height pixels, can be a lot bigger 
than a compressed PNG, so you might need more than 14Gb.  Hence, I'd advise 
against playing with the memory settings: Even if you manage to import it in 
geoserver, you'll be in trouble every time you try to look at it, as it will 
again use a high amount of memory.

I think you'll have to extract the geopkg, look at the pixel size of the 
images, and try to split up images that are too big, while keeping the geopkg 
metadata intact.

I can't help you there, unfortunately. My stone age advise would be to go in 
there with sqlite and extract some blobs, but there are probably better suited 
geo-specific tools available for creating tiles.



Hans Yperman
Department IT
[cid:3561a9e8-26c7-4c7d-96bf-a069f1001d57]
Vlaams Instituut voor de Zee vzw
InnovOcean Campus, Jacobsenstraat 1
8400 Oostende, België

☎+32 (0) 59 33 61 13
📧 hans.yper...@vliz.be<mailto:hans.yper...@vliz.be>
www.vliz.be<http://www.vliz.be>


________________________________
Van: Branislav Gacesa <branislav.gac...@htecgroup.com>
Verzonden: vrijdag 10 februari 2023 13:32
Aan: geoserver-users@lists.sourceforge.net 
<geoserver-users@lists.sourceforge.net>
CC: Kosta Cavic <kosta.ca...@htecgroup.com>
Onderwerp: [Geoserver-users] java.lang.OutOfMemoryError: Java heap space


Hello Team,

While trying to import 14+GB big geopkg file  I am experiencing java error as 
shown in attachment.

Please note that peak ram consumption during import is cca 27 out of 32 GB 
available memmory.

We even played with fine tunning of export JAVA_OPTS="-Xms4096m -Xmx16384m 
-XX:MaxPermSize=4096m" but nothing changed.



Any thoughts?



Have a nice weekend...

Thanks.

Branislav Gaćeša


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


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

Reply via email to