diff --git a/Pinchflat_improvements.md b/Pinchflat_improvements.md index f7facb5..a8a5488 100644 --- a/Pinchflat_improvements.md +++ b/Pinchflat_improvements.md @@ -73,7 +73,7 @@ SELECT source_id, metadata_filepath, fanart_filepath, poster_filepath, banner_fi - tvshow.nfo ``` -## Issue 4: SQLite "Database busy" errors blocking job processing +## Issue 4: SQLite "Database busy" errors blocking job processing [COMPLETED] **Problem:** The Oban job queue can get stuck with "Database busy" errors, preventing all indexing and download jobs from processing. This occurs when: diff --git a/config/config.exs b/config/config.exs index f57e0cc..2d2d6d0 100644 --- a/config/config.exs +++ b/config/config.exs @@ -32,7 +32,10 @@ config :pinchflat, config :pinchflat, Pinchflat.Repo, journal_mode: :wal, - pool_size: 5 + pool_size: 5, + # Set busy_timeout to 5 seconds to prevent "Database busy" errors during concurrent operations. + # Without this, queries fail immediately when the database is locked instead of waiting. + busy_timeout: 5000 # Configures the endpoint config :pinchflat, PinchflatWeb.Endpoint,