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
Vlaams Instituut voor de Zee vzw
InnovOcean Campus, Jacobsenstraat 1
8400 Oostende, België
+32 (0) 59 33 61 13
hans.yperman@…1715…
www.vliz.be
Van: Branislav Gacesa <branislav.gacesa@…11662…>
Verzonden: vrijdag 10 februari 2023 13:32
Aan: geoserver-users@lists.sourceforge.net geoserver-users@lists.sourceforge.net
CC: Kosta Cavic <kosta.cavic@…11662…>
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