Hi All,

We are getting the exception below when downloading a large wfs response in csv or gml format using gzip compression. Were are using geoserver 2.1.1 in production but this also happens in 2.3.3.

java.lang.OutOfMemoryError: Java heap space
        java.util.Arrays.copyOf(Arrays.java:2271)
        java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
        
java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
        java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
        
java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253)
        java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211)
        java.util.zip.GZIPOutputStream.write(GZIPOutputStream.java:146)
        
org.geoserver.filters.GZIPResponseStream.write(GZIPResponseStream.java:86)
        
org.geoserver.filters.GZIPResponseStream.write(GZIPResponseStream.java:79)
        
org.geoserver.filters.AlternativesResponseStream.write(AlternativesResponseStream.java:53)
        
org.geoserver.wfs.response.WfsExceptionHandler.handle1_0(WfsExceptionHandler.java:132)
        
org.geoserver.wfs.response.WfsExceptionHandler.handleDefault(WfsExceptionHandler.java:81)
        
org.geoserver.wfs.response.WfsExceptionHandler.handleServiceException(WfsExceptionHandler.java:59)
        
org.geoserver.ows.Dispatcher.handleServiceException(Dispatcher.java:1638)
        org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1583)
        org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:282)
        
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)


From the log message above, geoserver is falling over writing all the gzipped output to a ByteArrayOutputStream which in this case filled up all available memory.

I note that this was the subject of a previous issue GEOS-2626, but it ooks to me like the changes made there were reverted as a part of the changes made in GEOS-4845 r16568.

Was this an intentional change or is there a way of reducing the memory footprint of these requests? We'd prefer a low memory footprint for downloads using gzip compression if possible.

Thanks,
Craig Jones
Integrated Marine Observing System


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to