Skip to content

Commit

Permalink
Increase timeout to 45s
Browse files Browse the repository at this point in the history
Several users have experienced `OperationalError`s because the database
has been locked. Whilst these errors relate to the builder, it's proving
hard to recreate them locally. It's not the case, for example, that
making many updates to a single codelist in a short space of time locks
the database.

Finding the route cause of the errors will take time. However, given
that the error has occurred 55 times in the last 30 days, increasing the
timeout from 30s to 45s and monitoring the errors seems reasonable.

Thanks to @emprestige for reporting the errors in the first instance.

Closes #1811
  • Loading branch information
iaindillingham committed Jan 30, 2024
1 parent 31c24db commit b0d3cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opencodelists/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
# from coding_systems.versioning.apps)
DATABASES = {
"default": env.dj_db_url("DATABASE_URL", "sqlite:///db.sqlite3"),
"OPTIONS": {"timeout": 30},
"OPTIONS": {"timeout": 45},
}

DATABASE_DIR = Path(
Expand Down

0 comments on commit b0d3cc5

Please sign in to comment.