On 1 Dec 2003, at 18:49, Bernie Cosell wrote:

Is it possible to set from Perl for SQLite to wait instead of die when it
finds the database locked?


We've been getting a few:
[09:45:23] POP3< DBD::SQLite::db do failed: database is locked at ...

and in double-checking the docs, I found:

When SQLite tries to access a file that is locked by another process, the
default behavior is to return SQLITE_BUSY. You can adjust this behavior
from C code using the sqlite_busy_handler() or sqlite_busy_timeout() API
functions.

and I'm guessing that for my application, just setting busy_timeout to something like 30 seconds would do the job for me, but I'm not sure if/how that might be doable from DBD::SQLite in Perl.

It's currently hard coded at 30 seconds (you can edit dbdimp.h to change it if you want). It's on my todo list to make it configurable.


Matt.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to