[Xapian-discuss] File descriptor leak (?) in Python

Joost Cassee joost at cassee.net
Mon Aug 9 15:22:17 BST 2010


Hi Olly,

On Mon, Aug 9, 2010 at 16:17, Olly Betts <olly at survex.com> wrote:
> On Mon, Aug 09, 2010 at 02:41:03PM +0200, Joost Cassee wrote:
>> I have no idea if it is a problem in our code or in the Xapian Python
>> bindings. How do I debug this problem?
>
> If you're on Linux (or another platform which supports it) try:
>
> ls -l /proc/PID/fd
>
> where PID is the process id of your Xapian-using Python process.  This
> will show all the fds it has open, and which files they are, which should
> provide a clue.

lsof (and /proc/PID/fd) reports lots of descriptors pointing to
various files from the Xapian database. It's just that I don't know
where in the code (Python or otherwise) these files were opened (/
should have been closed).

Regards,
Joost

-- 
Joost Cassee
http://joost.cassee.net



More information about the Xapian-discuss mailing list