file system growing with open files

Lowell Filak lfilak at MEDINACO.ORG
Mon Feb 28 06:08:50 PST 2005


The following message was sent by Agneta Schick
<schick at SDAC.HANNOVER.BGR.DE> on Mon, 28 Feb 2005 13:28:23 +0100.

> > The following message was sent by Agneta Schick
> > <schick at SDAC.HANNOVER.BGR.DE> on Fri, 25 Feb 2005 10:52:42 +0100.
> >
> > > Hello,
> > >
> > > We have a system problem on a machine with a mapserver application:
> > "too many
> > > open files"
> > > A list of open files shows it is always the same file: the source file
> > for a
> > > reference map (.png) which is in read mode and never closed.
> > > This could be a version problem because we have a similar
application on
> > > another machine with no such problems.
> > >
> > > We run
> > > MapServer version 4.2.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ
> > > SUPPORTS=FREETYPE INPUT=TIFF INPUT=EPPL7 INPUT=OGR INPUT=GDAL
> > INPUT=SHAPEFILE
> > >  with mapscript
> > >  perl 5.8.3
> > >  mod_perl-1.29
> > >  apache_1.3.27
> > >  on Solaris 9.
> > >
> > > We have set rlim_fd_cur=1024 and rlim_fd_max=4096 to no avail.
> > >
> > >
> > > On the machine without this problem we run
> > > MapServer version 3.6.5 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
SUPPORTS=PROJ
> > > SUPPORTS=TTF INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=OGR INPUT=GDAL
> > > INPUT=SHAPEFILE
> > >  with mapscript
> > >  perl 5.6.1
> > >  mod_perl-1.27
> > >  apache_1.3.22
> > >  on Solaris 8.
> >
> > Agneta,
> >
> > A couple of thoughts.
> > Are you sure the files are just being left open or are there a load of
> > open connections (sockets) to the webserver itself that the processes
> > are waiting on to finish?
> > My understanding as of the 4.2+ series of MS is that Perl's garbage
> > collection will close things when a cgi finishes but when running under
> > mod_perl you probably need to explicitly undef the map object to trigger
> > the cleanup.?
> > I also noticed that the default max number of files per user is lower in
> > solaris 9 then in solaris 8.
> >
> > Lowell
>
> We explicity increased the number of files for solaris 9.
> We have no open connections and the map object is explicitly 'undef'.
> The perl script has 'use strict' and 'use warnings' but the apache
error_log
> is empty.
> I have reread and tested the perl script but see no reason for
> the reference map not being closed.
> Still the count of open files (reference map source) increases by one
for each
> interaction.
>
> If the MapServer reads the source data for the map as well as source data
> for the reference map why does only the reference map remain open ?

Agneta,

Sorry, I overlooked the parameters you set (won't ulimit alone take care
of that in 9?).
Even though it may not solve the problem, is there any reason you can't
upgrade to MS 4.4 so, if needed, a bug can be posted against the current
base?

Lowell



More information about the MapServer-users mailing list