[mapserver-users] Errors when using SLDs under stress test

Daniel Morissette dmorissette at mapgears.com
Mon Nov 28 23:20:39 EST 2011

On 11-11-28 10:04 PM, Sebastián Cruz wrote:
> AFAIK from my configuration, every client request triggers a Mapserver
> process to "download" the SLD from the URL specified and that in turn
> makes it "download" every image in the ExternalGraphic URL. When there
> are up to 10 concurrent requests everything is working fine, but when
> that goes up to 20 or 40 concurrent requests the errors appear. You can
> see this in this reflected in JMeter's result table [5]. Consider that
> the SLD file and the images are served through the same Apache that's
> serving Mapserver as FastCGI, so the "downloading" of info necessary to
> draw the map involves network connections to the same host.
> I'm guessing that maybe Mapserver and/or Apache are running out of file
> descriptors? Or available sockets? Or just hitting some limit of that
> kind that I'm not aware of. Am I trying to do this correctly?

It may be that you are hitting Apache's MaxClients, and because of the 
recursive downloads (MapServer initiating downloads to the same Apache 
that called it) you eventually end up in a deadlock situation where all 
your MapServer instances are holding Apache client connections while 
they wait for more clients connections to be available to complete all 
their own downloads.

If that's the case then you should see errors about MaxClients being 
reached in your Apache error log.

Daniel Morissette
Provider of Professional MapServer Support since 2000

More information about the mapserver-users mailing list