ML-191: avoid VACUUM / scrobble refresh write collision

Set busy_timeout: 5_000 on MusicLibrary.Repo so SQLite waits up to
5 seconds on lock contention instead of throwing SQLITE_BUSY
immediately (default is 0).

Move RepoVacuum from 0 3 to 3 3 (3:03 AM London) to avoid the
deterministic collision with RefreshScrobbles which fires on the
every-5-min cadence at the hour mark.
This commit is contained in:
Claudio Ortolina
2026-05-19 16:45:19 +01:00
parent d8b0dd2327
commit 4a6c80f7a9
3 changed files with 65 additions and 2 deletions
+1
View File
@@ -105,6 +105,7 @@ if config_env() == :prod do
# 128MB * pool_size = base memory usage
cache_size: -128_000,
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5"),
busy_timeout: 5_000,
show_sensitive_data_on_connection_error: false
background_database_path =