Skip to content
Snippets Groups Projects
Unverified Commit 231f2f94 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Raise the busy timeout

The default busy timeout is 0 and in the default configuration
read-blocks-write.  Thus by default it is extremely easy for concurrent
requests to the server to block each other.  So easy I can reproduce it with
about 100% fidelity in trivial local testing.

The transactions are all short lived, though, so re-attempting the lock
acquisition for for up to a second dramatically reduces the failure rate.

On a busy enough server it's conceivable a request might have to wait a full
second behind other requests to get access to the database.  In this case the
request will fail with the same "database is locked" error.  When that time
comes, it is probably worth just provisioning a faster server.  Or we could
explore WAL mode where read *doesn't* block write (though you can still only
have one writer and our API is pretty write heavy).
parent d8054f18
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment