Got the BlueMarble images from geotorrents http://www.geotorrent.org/details.php?id=61, then extracted a big single tile geotiff image
using gdal_transalte:
gdal_translate -of GTiff -projwin -140 85 -40 0 world-topo-bathy-200408-3x86400x43200.ecw na_2004_08.tiff
The result is a geotiff of 1.4GB, 24000x20000 pixels.
I've then tried to configure it in geoserver, but got an OOM when creating the coverage (creating the coverage set worked fine):
java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.(AbstractStringBuilder.java:45)
at java.lang.StringBuffer.(StringBuffer.java:79)
at com.sun.media.imageioimpl.plugins.tiff.TIFFFieldNode.initialize(TIFFFieldNode.java:165)
at com.sun.media.imageioimpl.plugins.tiff.TIFFFieldNode.getFirstChild(TIFFFieldNode.java:210)
at com.sun.media.imageio.plugins.tiff.TIFFField.createFromMetadataNode(TIFFField.java:470)
at com.sun.media.imageioimpl.plugins.tiff.TIFFImageMetadata.parseIFD(TIFFImageMetadata.java:1576)
at com.sun.media.imageioimpl.plugins.tiff.TIFFImageMetadata.mergeNativeTree(TIFFImageMetadata.java:1600)
at com.sun.media.imageioimpl.plugins.tiff.TIFFImageMetadata.mergeTree(TIFFImageMetadata.java:1624)
at javax.imageio.metadata.IIOMetadata.setFromTree(IIOMetadata.java:742)
at com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.getImageMetadata(TIFFImageReader.java:833)
at org.geotools.gce.geotiff.GeoTiffReader.getHRInfo(GeoTiffReader.java:256)
at org.geotools.gce.geotiff.GeoTiffReader.(GeoTiffReader.java:201)
at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:252)
at org.geotools.gce.geotiff.GeoTiffFormat.getReader(GeoTiffFormat.java:212)
at
... (cut here, the relevant part is above anyways)
Man, what in the coverage _metadata_ can be so big to occupy the standard 64MB heap space? Setting the heap to 128m solved the problem.
Now, I know when serving big images a bigger heap is suggested, yet
I'm wondering, may it be that the heap was already full with the tile
cache?
The JAI parameters configuration in the Geoserver setting suggest the
default value is 209715200, which I suppose is something around 200MB,
right?
I would suggest to have a setting that is proportial to the max heap
size instead, that is, use something like 50%, so that If I start geoserver with 64mb the tile cache won't eat all the heap memory.
That is, assuming the tile cache can do that, that is, allocate
X megabytes and keep them no matter what causing an OOM.
Cheers
Andrea