]> git.ipfire.org Git - pbs.git/commitdiff
database: Close connections sooner
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 15:12:43 +0000 (15:12 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Jul 2023 15:12:43 +0000 (15:12 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/database.py

index 8660823ee21907b75347277d65ff88c265002032..a6fda988565c4e29fbde084346ec2cf4b4ab8785 100644 (file)
@@ -53,6 +53,12 @@ class Connection(object):
                        # Set limits for min/max connections in the pool
                        min_size=4,
                        max_size=128,
+
+                       # Give clients up to one minute to retrieve a connection
+                       timeout=60,
+
+                       # Close connections after they have been idle for one minute
+                       max_idle=60,
                )
 
        def __configure(self, conn):