I have geoserver hooked up to an external WFS for around 50 layers. Using openlayers, if I select them one at a time the all load quite happily.

However I have an option to select all of them at once, on which it locks up geoserver, in that I cannot even access the web-admin (load average on the server is zero though)

Whilst it is probably not entirely practical, I would like to find some way to mitigate this issue. Anyone have any advice on the matter?

(my current train of thought is implement some way to stagger loading all the layers and do them one at a time or in batches, but am unsure if I can query a layer to see if it has loaded)

1 Answer 1


There are a few options that you could use.

You could listen to when source has loaded as you have said, check Using layer loadstart & loadend events in OpenLayers 3?

Or you could limit area for which to display features and then add new ones as user moves around the map. But that would require a custom loader and I am not sure how fast it would be going through 50 layers.

You might also consider using clusters, but I haven't used that option yet so it's hard to recommend this option.

You could also request a list of multiple layers at once using the following example URL : http://localhost:8087/gswps/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_cities,topp:tasmania_roads&propertyName=(ADMIN_NAME,CITY_NAME)(TYPE)

And then create custom loaders for them or limit them with bounding box.

Lastly, it would also depend on how many features on average each layer has. Hope this gives you some idea on how to proceed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.