[mapserver-users] Mapserver crashes with large number of layers

Umberto Nicoletti umberto.nicoletti at gmail.com
Wed Dec 8 17:21:18 EST 2010


On Wed, Dec 8, 2010 at 3:58 PM, Oliver Wesp <oliver.wesp at gmail.com> wrote:
> 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). Webserver is Apache 2.2.
>
> We have a large Mapfile (seperated into 5 different parts using
> INCLUDE) with a total of 571 Layers. 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.
> 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

Looks like a deadlock to me.
If you have msvc on the machine try to attach the debugger to the
process and see where it's stuck by requesting a stacktrace for
example. If msvc is not available I'd try ProcessMonitor from
sysinternals and last but not least good ole gdb (yes it does run on
Windows).

Recompile mapserver with debugging symbols to get accurate function
names and line numbers from the debugger.

Last step: verify that the mapserv process ran by apache is not
loading different dlls from the command line you used to test it.

HTH,
Umberto


> 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".
>
> Right know we have no idea of what to look at. If anybody has any hint
> what might goes wrong we maybe would be able to look at it and maybe
> fix it. But right now we're stuck.
>
> Best regards,
> Oliver
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list