Skip to content
Snippets Groups Projects
  1. Jun 22, 2021
  2. Sep 22, 2020
  3. Sep 21, 2020
  4. Sep 18, 2020
  5. Sep 17, 2020
  6. Sep 11, 2020
  7. Sep 10, 2020
  8. Jun 03, 2020
  9. May 30, 2020
  10. May 29, 2020
    • Jean-Paul Calderone's avatar
      3d1705bd
    • Jean-Paul Calderone's avatar
      Raise the busy timeout · 231f2f94
      Jean-Paul Calderone authored
      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).
      231f2f94
Loading