[OpenLayers-Users] ScrollWheel sends requests too quickly

Andrea Aime aaime at openplans.org
Mon Sep 3 10:45:55 EDT 2007


Christopher Schmidt ha scritto:
> On Mon, Sep 03, 2007 at 03:18:58PM +0200, huub fleuren wrote:
>> Especially GeoserverWMS+ Tomcat stops running instantly if the scroll wheel is used (two clicks). The container must be restarted.
>>
>> I guess it would help a great deal, at least geoserver and/or tomcat, (but obviously any server load) if requests were sent economically.

Oh hum, restarted? You mean GeoServer gets very loaded for some seconds, 
or that it goes down all the way?
Anyways, the problem here is that OL gives up requesting the images, but 
the web container has no way to tell GeoServer so, so we keep on 
rendering happily until we reach the point of writing out stuff, when we 
notice the client connection is closed and then bail out.

Now, there are various ways to handle this:
* use simpler styles, make sure no style has <opacity> less than 1
   (translucent rendering is very expensive)
* use appropriate data sources, such as postgis for big data sets,
   or shapefiles whose spatial index creation has been forced (do you
   have a .qix file in the shape file set?)
* make sure very detailed layers become active only when fairly zoomed
   in (you can use SLD to do so, have a look at tiger roads sample style
   for a multilevel SLD)
* activate the on the fly meta tiler, so that tile requests are grouped
   in bunch of 9
* see how the GeoServer map preview (using OL) sets parameters to limit
   server load (just preview a layer and have a look at the HTML source)
* grab a more recent GeoServer version (for example, a 1.6.0 nightly)
* read the "GeoServer in production" page for more hints: 
http://docs.codehaus.org/display/GEOSDOC/4+GeoServer+in+Production+Environment

Hope this helps
Cheers
Andrea





More information about the Users mailing list