[Xapian-discuss] Problems with file descriptors
Gavin Ellis Mendel-Gleason
gavin at houseofireland.com
Mon Mar 13 18:08:49 GMT 2006
Switching to 0.9.4 seems to have fixed it.
Gavin
On Mon, 2006-03-13 at 17:36 +0000, Gavin Ellis Mendel-Gleason wrote:
> I had already checked fuser -v position.DB in the database directory and
> this is what it reports:
>
> position.DB root 25476 f.... apache2
> root 25477 f.... apache2
> root 25500 f.... apache2
> root 25502 f.... apache2
> root 25506 f.... apache2
> root 25511 f.... apache2
>
> lsof -p <Apache PID> reports the database files a large number of times
> (several pages worth).
>
> I've also run a couple of tests where I do the searches in a seperate
> php process via exec() and return the results to my php scripts on
> stdout. This doesn't exhibit the problem, further strengthening my
> belief that it is in fact never reclaiming the resource unless the
> process terminates.
>
> Turning off searching and restarting apache (or waiting long enough)
> completely eliminates the problem.
>
> I think I'll try switching to 0.9.4
>
> Thanks for all of the help
>
> Gavin
>
> On Mon, 2006-03-13 at 18:17 +0100, R. Mattes wrote:
> > On Mon, 2006-03-13 at 16:36 +0000, Olly Betts wrote:
> > > On Mon, Mar 13, 2006 at 01:47:25PM +0000, Gavin Ellis Mendel-Gleason wrote:
> > > > I'm using
> > > >
> > > > $database = null;
> > > >
> > > > after every query, but this doesn't seem to help.
> > >
> > > Hmm, that's what I was about to suggest.
> >
> > Somehow i wonder whether this is really a Xapian
> > problem at all. Gavin, are you shure that the database
> > handles leek FDs? Running out of file descriptors is a
> > classic problem for untuned servers on medium to high
> > traffic sites. What worker model do you use? Are your
> > Ulimits settings appropriate? Did you tune your kernel
> > filesystem parameters? Did you tune your TCP stack (the
> > old FIN_WAIT problem). My last encounter with the FD-
> > problem was a broken firewall that didn't close client
> > sockets - ugh!
> >
> > Can you monitor what file handles stay open? Just grab
> > the PID of a server child process (_not_ the parent daemon)
> > and do: lsof -p <PID>
> > At the same time, check who has a handle on the DB:
> >
> > fuser -p /your/path/to/data/base/default/termlixt_baseA
> >
> > HTH Ralf Mattes
> >
> > > What Xapian version are you using?
> > >
> > > Cheers,
> > > Olly
> > >
> > > _______________________________________________
> > > Xapian-discuss mailing list
> > > Xapian-discuss at lists.xapian.org
> > > http://lists.xapian.org/mailman/listinfo/xapian-discuss
> >
>
>
> _______________________________________________
> Xapian-discuss mailing list
> Xapian-discuss at lists.xapian.org
> http://lists.xapian.org/mailman/listinfo/xapian-discuss
More information about the Xapian-discuss
mailing list