On 18/02/15 14:46, Richard Hipp wrote:
> I'm guessing that running "PRAGMA busy_timeout=4000;" (or some other
> reasonable number of milliseconds) shortly after opening the
> database connection will likely cure your problem.
> https://www.sqlite.org/pragma.html#pragma_busy_timeout You might
> also want to consider switching to WAL mode
> (https://www.sqlite.org/wal.html) for its greater concurrency. 

That was the first thing I thought of too, but you can see in the bug
report and from my comments on
https://gerrit.wikimedia.org/r/#/c/190851/ that we have ruled it out.
PHP calls sqlite3_busy_timeout(), setting it to 60 seconds by default,
which is equivalent to PRAGMA busy_timeout=60000.

If there was no busy timeout, it wouldn't sleep after failure to
acquire the SHARED lock. But it does sleep.

-- Tim Starling

Reply via email to