diff options
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/web/server.scm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index b73b186..e86b97b 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -109,7 +109,11 @@ (open-postgresql-connection "web" postgresql-statement-timeout)) - (floor (/ postgresql-connections 2)))) + (floor (/ postgresql-connections 2)) + #:idle-seconds 30 + #:destructor + (lambda (conn) + (close-postgresql-connection conn "web")))) (reserved-connection-pool (make-resource-pool @@ -117,7 +121,11 @@ (open-postgresql-connection "web-reserved" postgresql-statement-timeout)) - (floor (/ postgresql-connections 2)))) + (floor (/ postgresql-connections 2)) + #:idle-seconds 600 + #:destructor + (lambda (conn) + (close-postgresql-connection conn "web-reserved")))) (resource-pool-default-timeout 5)) |