From 08b5d39624104710e39afb15c1fb8de5ef8da5b5 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 5 Oct 2024 10:56:17 +0100 Subject: Expire database connections on exceptions As this might help avoid odd SQLite issues. --- nar-herder/database.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nar-herder/database.scm b/nar-herder/database.scm index eb16bd2..7ce4aef 100644 --- a/nar-herder/database.scm +++ b/nar-herder/database.scm @@ -309,6 +309,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS (lambda (db) (sqlite-close db)) #:lifetime 50000 + #:expire-on-exception? #t #:name "db r" ;; Use a minimum of 2 and a maximum of 8 threads @@ -358,6 +359,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS (sqlite-close db)) #:lifetime 500 + #:expire-on-exception? #t #:name "db w" ;; SQLite doesn't support parallel writes -- cgit v1.2.3