aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-10-05 10:56:17 +0100
committerChristopher Baines <mail@cbaines.net>2024-10-05 10:56:17 +0100
commit08b5d39624104710e39afb15c1fb8de5ef8da5b5 (patch)
tree9752becbfdeaecab2e5855cb69a58b1c502d7bc6
parent65f490f944a660377d78e69c16fae482640ff64f (diff)
downloadnar-herder-08b5d39624104710e39afb15c1fb8de5ef8da5b5.tar
nar-herder-08b5d39624104710e39afb15c1fb8de5ef8da5b5.tar.gz
Expire database connections on exceptions
As this might help avoid odd SQLite issues.
-rw-r--r--nar-herder/database.scm2
1 files changed, 2 insertions, 0 deletions
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