[mapserver-users] Mapserver crashes with large number of layers
Yves Moisan
yves.moisan at boreal-is.com
Wed Dec 8 08:07:34 PST 2010
> Dear List,
>
> we're kind of stuck with the following problem:
>
> First of all we are running Mapserver 5.6.5 in CGI Mode on Windows
> 2003 Server (64bit).
Hi,
I would first try to run it in FastCGI. We also found running PHP (if
you are using MS4W for instance) in FastCGI helps.
> Webserver is Apache 2.2.
>
> We have a large Mapfile (seperated into 5 different parts using
> INCLUDE) with a total of 571 Layers.
Try to keep separate mapfiles. The shorter they are the better. We
also found putting STATUS OFF helps.
> The layers have different
> MAXSCALEDENOM values so not all of them are drawn at all scales. The
> layers are referencing the DATA via TILEINDEX (it's S-57 data read
> through OGR). Most of the layers cover only a small area, so if I zoom
> in to the map more and more layers must be taken into account of
> drawing but only a small number must be drawn. All of the layers are
> divided into three groups using the GROUP parameter.
> What happens if I zoom in to the map at some point mapserver crashes
> (actually it's not crashing it just stucks). If I reduce the total
> number of layers (by commenting out parts of the mapfile) the map will
> be drawn again. So my guess is that there is a problem with the number
> of layers (or styles?, or symbols?, or number of layers per group?)
> included.
Keep mapfiles small is what we found was most useful.
> I turned on debugging on all of my layers but that didn't helped. If I
> check the taskmanager mapserver.exe goes to 100% cpu usage and goes
> back to zero after a few seconds but it's not being terminated. It's
> still running in the process list. Debug output stops right in the
> middle of the line. No error message is send to the client or written
> to any of the logfiles. Actually no response is send to the client at
> all. If I terminate the process using the task manager "Premature end
> of script headers: mapserv.exe" is written to the apache error.log and
> the client shows "Internal Server Error".
I've had premature end os script headers from time to time. I have no
idea what triggers that.
HTH,
Yves
More information about the MapServer-users
mailing list