[Geoserver-users] Upload Shape file: No concurrent requests

Hi,

We are using GeoServer 2.5 RC2. When uploading a shape file via the REST API, the server does not respond to other requests until after the shape file has been processed.

For example, if I start a file upload and then click on the Layers menu item in the web app, the response for the Layers page is not received until after the file upload and processing have completed.

I researched the issue but did not find a suitable cause/answer. I did install the control flow extension and created an controlflow.properties file in the data directory, but this did not appear to have any effect.​

How do I diagnose the cause of this behavior?

Thanks for your time.

Sean Winstead

On Fri, May 16, 2014 at 7:34 PM, Sean Winstead <seanw@anonymised.com> wrote:

  Hi,

We are using GeoServer 2.5 RC2. When uploading a shape file via the REST
API, the server does not respond to other requests until after the shape
file has been processed.

For example, if I start a file upload and then click on the Layers menu
item in the web app, the response for the Layers page is not received until
after the file upload and processing have completed.

I researched the issue but did not find a suitable cause/answer. I did
install the control flow extension and created an controlflow.properties
file in the data directory, but this did not appear to have any effect.​

How do I diagnose the cause of this behavior?

Simple, it's the configuration lock. Our configuration subsystem is not
able to handle correct concurrent writes,
or reads during writes, so there is a whole instance read/write lock that
is taken every time you use the rest
api and the user interface, nothing can be done while the lock is in place

If you want, you can disable it using the system variable
GeoServerConfigurationLock.enabled,
-DGeoServerConfigurationLock.enabled=true
but of course we cannot predict what will happen to the configuration if
you do that.

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

I am curious if the issue I am seeing is part of this explanation.

There are times that GeoServer successfully completes the upload
and processing of a shapefile but then does not enable the layer
with it is finished. I am using your REST API and both the layer
and datastore are successfully created but the layer itself is disabled.
And all subsequent requests for that layer will fail because
GeoServer does not see it. As soon as I enable it via your UI, all
requests for that layer are then successful.

While this happens rarely, it does happen enough to be a problem.

Is it possible that there is a race condition on GeoServer where if it
has not completed the shapefile processing of a given layer but
receives a request for that layer, that GeoServer will continue the
processing but not enable the layer when finished?

Is there a REST API call to enable a layer? I have not found one
in my googling of this problem.

Thank you

Phil Russo