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

Sebastián Cruz default50 at gmail.com
Mon Nov 28 22:04:41 EST 2011


Hello list,

this is my first post, so please bear with me if do something wrong, and
nice to meet you all by the way.

I'm working on my thesis for college, which involves benchmarking
Geoserver vs. Mapserver under different WMS loads and strictly using
open standards everytime there is one available. I've based most of my
work on 2009 FOSS4G's "WMS shootout", but I think I've digressed a lot
since I started.

Enough intros and into the problem itself: when I run the tests from a
JMeter script [1], querying Mapserver for random tiles of a layer
containing only points, styled with an SLD using an ExternalGraphic as a
PointSymbolizer [2], I'm getting some errors [3] which I suspect where
they're coming, but I would like you to confirm it and probably help me
solve them. Enabling debug level 4 in the mapfile [4] I can see:

        msHTTPExecuteRequests(): HTTP request error. HTTP: request
        failed with curl error code 7 (Failed to connect to 127.0.0.1:
        Cannot assign requested address) for
        http://mapserver.supertv.channel/slds/ms-gnis.sld
        msSLDApplySLDURL: WMS server error. Could not open SLD
        http://mapserver.supertv.channel/slds/ms-gnis.sld and save it in
        temporary file /var/www/ms_tmp/4ed42982_453_1f35.sld.xml. Please
        make sure that the sld url is test.

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?

On a side note, Geoserver has the file:// URL type available for the SLD
ExternalGraphic item and I'm not seeing the same issues there.

Some useful context information:

- I'm running Mapserver 5.6.5-2+squeeze2 from Debian.
- Trying to speedup Apache I configured it with mod_file_cache. I used
mmapfile and cachefile directives to have everything in RAM. Apache's
configuration can be seen here [6]. It didn't improve the situation.
- Apache's access [7] and error [8] logs.
- Syslog says some Mapserver processes are segfaulting [9].
- The same problem appears if I use PostgeSQL + PostGIS as a backend,
instead of a Shapefile as described here.
- I'm not having any other issues with other layers or backends.
- The machine's /etc/hosts file says:

        127.0.0.1    localhost mapserver mapserver.supercanal.tv
        
        ::1     ip6-localhost ip6-loopback
        fe00::0 ip6-localnet
        ff00::0 ip6-mcastprefix
        ff02::1 ip6-allnodes
        ff02::2 ip6-allrouters
        ff02::3 ip6-allhosts

Don't hesitate to ask me for more info if you need it, and thanks in
advance for your time.

[1] http://pastebin.com/9XaWmCrG
[2] http://pastebin.com/iZ6p3vGJ
[3] http://pastebin.com/EKh046sE
[4] http://pastebin.com/LqwKQ63b
[5] http://pastebin.com/3146dPbn
[6] http://pastebin.com/yyCiXwgU
[7] http://pastebin.com/JdxRk5Z0
[8] http://pastebin.com/NNRkV486
[9] http://pastebin.com/91sAyXit

-- 
Sebastián Cruz
default50 at gmail.com
GPG FP: 5D35 54C4 ABA7 DED9 133F 5272 04F7 13E3 B03D 64C4



More information about the mapserver-users mailing list