[mapserver-users] FastCGI issues with MapServer 5.2, Ubuntu 8.04

Andrea Aime aaime at opengeo.org
Wed Aug 20 08:59:31 PDT 2008


Hi,
I'm struggling a trying to configure MapServer 5.2
for the performance comparison presentation that we'll
hold at FOSS4G 2008
(http://conference.osgeo.org/index.php/foss4g/2008/paper/view/256)

In particular, no matter what I do, a single, long running
mapserv process seems to be handling all of the requests
coming down the pipe, regardless of how many client threads
I'm using to hit the server. Some details on what I've
done so far follow.

I've followed the instructions on these pages to build
MapServer from sources along with support with fastcgi
and AGG:
http://mapserver.gis.umn.edu/docs/howto/mapserverubuntu
http://mapserver.gis.umn.edu/docs/howto/fastcgi

I then copied a mapserv in /usr/lib/cgi-bin, and then
made a copy named mapserver.fcgi to be able and test
with both fastcgi enabled and not.

Apache wise, the /etc/apache/mods-available/fastcgi.conf
contains:
<IfModule mod_fastcgi.c>
   AddHandler fastcgi-script .fcgi
   #FastCgiWrapper /usr/lib/apache2/suexec
   FastCgiIpcDir /var/lib/apache2/fastcgi
   FastCgiConfig -initial-env PROJ_LIB=/usr/local/share/proj 
-initial-env 
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib 
-appConnTimeout 60 -idle-timeout 60 -init-start-delay 1 -minProcesses 2 
-maxClassProcesses 20 -startDelay 5
</IfModule>

and the /etc/apache/sites-enabled/default contains:

NameVirtualHost *
<VirtualHost *>
         ServerAdmin webmaster at localhost

         DocumentRoot /var/www/
         <Directory />
                 Options FollowSymLinks
                 AllowOverride None
         </Directory>
         <Directory /var/www/>
                 Options Indexes FollowSymLinks MultiViews
                 AllowOverride None
                 Order allow,deny
                 allow from all
         </Directory>

         ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
         <Directory "/usr/lib/cgi-bin">
                 AllowOverride None
                 Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                 Order allow,deny
                 Allow from all
         </Directory>

         ErrorLog /var/log/apache2/error.log

         # Possible values include: debug, info, notice, warn, error, 

         # alert, emerg.
         LogLevel warn

         CustomLog /var/log/apache2/access.log combined
         ServerSignature On

     Alias /doc/ "/usr/share/doc/"
     <Directory "/usr/share/doc/">
         Options Indexes MultiViews FollowSymLinks
         AllowOverride None
         Order deny,allow
         Deny from all
         Allow from 127.0.0.0/255.0.0.0 ::1/128
     </Directory>
</VirtualHost>

If I hit cgi-bin/mapserv a mapserv executable is created and destroyed
per request, which is what I expect, but if I hit cgi-bin/mapserv.fcgi
a single process is created, which never dies (that's ok) and that 
serves alone every incoming request, meaning the second core of my
cpu is not working at all. Of course this is bad, it hampers
scalability as the client threads used for testing go up.
I've tried both with threaded and forked model for Apache itself, made 
no difference.

Any suggestion?
Cheers
Andrea





More information about the MapServer-users mailing list