From e7e067b9ff24187d28687da9e53b22bf243054c2 Mon Sep 17 00:00:00 2001 From: Smit Date: Thu, 6 Jul 2023 16:11:19 +0530 Subject: [PATCH 1/2] Increase sqlite connect timeout to 1s --- testmon/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testmon/db.py b/testmon/db.py index 86f3c9c..6f1cc65 100644 --- a/testmon/db.py +++ b/testmon/db.py @@ -21,7 +21,7 @@ class TestmonDbException(Exception): def connect(datafile, readonly=False): connection = sqlite3.connect( - f"file:{datafile}{'?mode=ro' if readonly else ''}", uri=True + f"file:{datafile}{'?mode=ro' if readonly else ''}", uri=True, timeout=5000 ) connection.execute("PRAGMA journal_mode = WAL") From a67681593d8918c6d8f992012e77784b0b0c0d74 Mon Sep 17 00:00:00 2001 From: Smit Date: Thu, 6 Jul 2023 17:04:54 +0530 Subject: [PATCH 2/2] Change to 60s --- testmon/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testmon/db.py b/testmon/db.py index 6f1cc65..90e04fd 100644 --- a/testmon/db.py +++ b/testmon/db.py @@ -21,7 +21,7 @@ class TestmonDbException(Exception): def connect(datafile, readonly=False): connection = sqlite3.connect( - f"file:{datafile}{'?mode=ro' if readonly else ''}", uri=True, timeout=5000 + f"file:{datafile}{'?mode=ro' if readonly else ''}", uri=True, timeout=60 ) connection.execute("PRAGMA journal_mode = WAL")