[Twisted-Python] Twisted + Xapian WriteableDatabase leaves db_lock file on exit.

jarrod roberson jarrod at vertigrated.com
Tue May 2 21:25:25 MDT 2006


Twisted Sumo 2006-02-12

xapian and xapian bindings 0.9.2 svn 6532

I have written a Twisted service to write to a xapian database.
I am using WriteableDatabase using DB_CREATE_OR_OPEN.

I am also using twistd and the application plumbing to start the server.

I have tried everything but no matter how I stop the server I can't get it
to shutdown xapian cleanly.

I have implemented stopService() on my service and do a .flush() and have
even tried setting the db instance to None
and tried using del self.db as well.

I even added a reactor.addSystemEventTrigger() and tried "before", "during"
and "after" "shutdown" and nothing
seems to work.

I stop the service with CTRL-C, kill -TERM `cat twistd.pid' and just plain
kill 'cat twistd.pid'

It leaves the db_lock file everytime and I don't know what else it might not
be cleaning up correctly either.

Has anyone gotten a WritableDatabase to work with Twisted?
If so, how do I stop Twisted so it will shutdown xapian cleanly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20060502/077ded0d/attachment.html>


More information about the Twisted-Python mailing list