Hello,

We are building an application that rely on GeoServer for :
  - publishing ImageMosaic layers with time support through WMS
  - running the WPS process that create the rasters for ImageMosaic layers

As the WPS process is fairly slow, we decided to parallelize it by splitting
the load : if one process is supposed to generate 300 rasters, then 10
processes should generate 30 rasters each.

As we were in testing mode, we used shapefile as the way to store the index
of the created mosaic. It worked like a charm when each process was launched
synchronously (i.e. no concurrency, just like if we were using a single WPS
process). But, our goal was to make it work in asynchronous mode. And this
is where started the nightmare : lots and lots of exception stacks were
printed in geoserver logs and most of them were talking about the shapefile
index being missing or corrupted.

This resulted in :
  - missing timesteps in the getCapabilities document
  - corrupted layers
  - corrupted getCapabilities
  - ...

So we changed to a postgis database for storing the index (which is what we
intended to do from the beginning, but lacked the motivation at the time).
Using this postgis database seems to solve most of the problems concerning
the index, but there are still exceptions stack printed *when a user tries
to render a layer that is, at the same time, being updated by the WPS
process*.

These exceptions does not seems to have any effect on the rendering : when
all process are done, each time I checked, all timesteps were declared in
getCapabilities documents, and were available when requested for rendering.

Here is a set o stacktrace I was able to get from GeoServer when
stress-testing the application :

11 Sep 16:35:36 ERROR [geotools.rendering] -
java.lang.NullPointerException
        at
org.geotools.gce.imagemosaic.ImageMosaicReader.getRasterManager(ImageMosaicReader.java:128)
**

11 Sep 16:35:36 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:36 ERROR [geotools.rendering] - Unable to create this mosaic
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:36 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:36 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:36 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: java.lang.NullPointerException
        at
org.geotools.gce.imagemosaic.ImageMosaicReader.getRasterManager(ImageMosaicReader.java:128)
**

11 Sep 16:35:39 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:40 ERROR [geotools.rendering] - Unable to create this mosaic
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: java.lang.NullPointerException
        at
org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1320)
**

11 Sep 16:35:40 ERROR [geotools.rendering] -
java.lang.NullPointerException
        at
org.geotools.gce.imagemosaic.ImageMosaicReader.getRasterManager(ImageMosaicReader.java:128)
**

11 Sep 16:35:40 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: java.lang.NullPointerException
        at
org.geotools.gce.imagemosaic.ImageMosaicReader.getRasterManager(ImageMosaicReader.java:128)
**

11 Sep 16:35:40 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:40 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
java.lang.NullPointerException
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:40 ERROR [geotools.rendering] - Unable to create this mosaic
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: java.lang.IllegalStateException: The index store has been
disposed already.
**

11 Sep 16:35:40 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.IllegalStateException: DataSource not available after
calling dispose() or before being set.
**

11 Sep 16:35:40 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.IllegalStateException: The index store has been
disposed already.
**

11 Sep 16:35:42 ERROR [geotools.rendering] -
java.lang.NullPointerException
**

11 Sep 16:35:42 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: java.lang.NullPoosgeointerException
**

11 Sep 16:35:42 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**

11 Sep 16:35:42 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.IllegalStateException: DataSource not available after
calling dispose() or before being set.
**

11 Sep 16:35:42 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.RuntimeException: Unable to obtain connection: Data
source is closed
Caused by: java.sql.SQLException: Data source is closed
**

11 Sep 16:35:42 ERROR [geotools.rendering] - Unable to create this mosaic
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: java.lang.IllegalStateException: DataSource not available after
calling dispose() or before being set.
**

11 Sep 16:35:42 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Rendering process failed
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.IllegalStateException: DataSource not available after
calling dispose() or before being set.
**

11 Sep 16:35:44 ERROR [geoserver.ows] -
org.geoserver.platform.ServiceException: Error rendering coverage on the
fast path
Caused by: org.geoserver.platform.ServiceException:
org.geotools.data.DataSourceException: Unable to create this mosaic
Caused by: org.geotools.data.DataSourceException: Unable to create this
mosaic
Caused by: java.lang.NullPointerException
**


All these exceptions occurs only if I try to navigate and render the
available dates before all WPS processes are done : i.e. if I wait for all
the process to finish and then navigate, no stack trace at all !!

But then again : none of these errors seems to corrupt the layer as it
happened before when using the shapefile index.

My question is : should we ignore these stack trace ?

Thanks for your consideration,
Cyril

















--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Rendering-concurrency-tp5223872.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to