[mapserver-dev] Mapfile is parsed on every MapServer FastCGI request

Bjoern Schilberg bjoern.schilberg at intevation.de
Mon Jan 3 09:49:10 EST 2011


Hello,
i discover that every time a request is send to a MapServer FastCGI the
complete mapfile is read and parsed on every request. I would expect that the
mapfile configuration is only read once, when the first request is send to the
MapServer FastCGI and __NOT__ on every request. Is my expectation wrong or did 
i configure the MapServer FastCGI in a wrong way? 

bj

Debug / Reproduce
===========

I discovered the behavior by using strace:

strace -s 2000 -ff -p pid*

*-p pid: Process ID of MapServer FastCGI


Configuration
========

This is the way how the MapServer FastCGI is configured:

vhost.conf
-------------

...

<Directory "/srv/www/fcgi-bin">
SetHandler fcgid-script
SetEnvIf Request_URI "/fcgi-bin/wms.fcgi" 
MS_MAPFILE=/PATH/TO/MAPFILE/mapfile.map
AllowOverride None
Options +ExecCGI -MultiViews FollowSymLinks
Order allow,deny
Allow from all
</Directory>

...

In /srv/www/fcgi-bin
------------------------

lrwxrwxrwx 1 root root   12 2010-12-16 11:10 wms.fcgi -> mapserv.fcgi
-rwxr-xr-x 1 root root 1.6M 2010-12-16 10:35 mapserv.fcgi

Environment
========

./mapserv.fcgi -v
MapServer version 5.6.5 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
SUPPORTS=GEOS SUPPORTS=RGBA_PNG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=MYGIS
INPUT=SHAPEFILE

/usr/sbin/httpd2 -v
Server version: Apache/2.2.10 (Linux/SUSE)
Server built:   May  5 2010 14:32:30

Information for package apache2-mod_fcgid:
Name: apache2-mod_fcgid
Version: 2.2-31.17


More information about the mapserver-dev mailing list