[Xapian-discuss] PHP5 example don't understand
Olly Betts
olly at survex.com
Mon Mar 19 14:49:27 GMT 2007
On Mon, Mar 19, 2007 at 02:36:04PM +0000, iX Gamerz wrote:
> I try to use the line "php newfile.php
> /var/lib/xapian-omega/data/default/" to test the CLI.
> The first time, it seems to work but was completely freezed after a few
> minute, I close the window.
Without knowing what's in "newfile.php", it's hard to comment...
> The second time, I try the script, I receive the folowing error:
>
> /var/www/xapian$ php newfile.php /var/lib/xapian-omega/data/default/
>
> Fatal error: Uncaught exception 'Exception' with message
> 'DatabaseLockError: Unable to acquire database write lock
> /var/lib/xapian-omega/data/default//db_lock' in
> [...]
> I think that is a lock for a concurrent access, but now how Can I remove
> the lock?
Yes, the lock is to prevent concurrent write access. If the process
dies uncleanly, the lock isn't removed (this is only true for quartz;
flint fixes this issue by using a different locking technique).
If you're sure that the process which created the lock is no longer
running (on Unix, "fuser" or "lsof" can show which processes have the
"_DB" files in the database directory open), then you can just delete
the lock file by hand.
Cheers,
Olly
More information about the Xapian-discuss
mailing list