[Mapserver-users] mapscript and XBase cause Out of memoryerrorand/or premature endof script headers error

Jonathan W. Lowe jlowe at giswebsite.com
Fri Jan 10 12:48:04 EST 2003


Lowell,

The problem Daniel Morissette describes below )("crash in the web server
environment just after the call to $map->draw()") is exactly what was
happening with my FreeBSD installation.  When the sys admin increased
the memory ceiling to 12 MB, the problem went away.  However, when I
zoomed to a level requiring many street labels, the problem reappeared.
I had compiled mapserver and perl mapscript against completely local
builds of gd, proj-4, libpng, and all other required libraries.  When I
recompiled using the system builds of those libraries, the program that
had been crashing ran fine.  This suggests some kind of memory
limitation, yes?

When running the problematic script with a directive...
	$ENV{MS_ERRORFILE} = "/usr/home/gisweb/www/logs/mapscript.log"; # map
engine error log
...to send error messages to a log file, the following appeared in the
log after crashes of the $map->draw() line:

Tue Jan  7 15:06:08 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:08 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:08 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msSearchDiskTree(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msAddImageSymbol(): Unable to access file.
Tue Jan  7 15:06:09 2003 - msGetLabelSize(): TrueType Font error. libgd
was not built with TrueType font support

The last line, about the TrueType Font error seems to be the relevant
one, although I did build libgd with freetype1.  (The msSearchDiskTree
error is explained in other postings in this list.)

I've accepted that I will not be able to run a local copy of all the
supporting libraries and so am now at the mercy of the host's system
administrator to keep the right versions of gd, etc. on the system. With
the exception of some label rotation problems caused (I think) by a bug
in an earlier version of gd (1.8.4), this seems to work, so I've
abandoned the local setup and memory ceiling question.  Learned to date:
12 MB apparently is inadequate for the image processing requirements of
the combined libraries + mapserver, but the needed ceiling is not known.

Hope this helps,
Jonathan Lowe

On Fri, 2003-01-10 at 07:56, Lowell Filak wrote:
> Jonathan;
> Have you been able to identify anything?
> Thanks.
> Lowell
> 
> The following message was sent by Daniel Morissette <morissette at dmsolutions.ca> on Thu, 09 Jan 2003 20:46:55 -0500.
> 
> > "Jonathan W. Lowe" wrote:
> > > 
> > > The rest of the story is still not over, however.  The test script that now
> > > works is only a test script; the main script still fails, with a "Premature end
> > > of script headers" error message in the log file.  I plan to slowly add
> > > subroutines to the working script and see where it stops working...
> > > 
> > 
> > FYI we have run into a similar issue on a Linux box where a Perl
> > MapScript (3.6.x) script would work fine at the command line but would
> > sometimes crash in the web server environment just after the call to
> > $map->draw(), resulting in a premature end of script headers (or
> > truncated output sometimes)... I have never been able to identify the
> > source of the problem, but if you find anything then I would be very
> > interested in hearing the solution.
> > 
> > Daniel
> > -- 
> > ------------------------------------------------------------
> >  Daniel Morissette               morissette at dmsolutions.ca
> >  DM Solutions Group              http://www.dmsolutions.ca/
> > ------------------------------------------------------------
> 
> 





More information about the mapserver-users mailing list