[#1187] added Dao query semaphore and base fail/retry

This commit is contained in:
Gani Georgiev
2022-12-08 10:40:42 +02:00
parent 355f7053fd
commit 693954cdcd
38 changed files with 356 additions and 101 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func connectDB(dbPath string) (*dbx.DB, error) {
// use a fixed connection pool to limit the SQLITE_BUSY errors
// and reduce the open file descriptors
// (the limits are arbitrary and may change in the future)
db.DB().SetMaxOpenConns(1000)
db.DB().SetMaxOpenConns(800)
db.DB().SetMaxIdleConns(30)
db.DB().SetConnMaxIdleTime(5 * time.Minute)
+1 -1
View File
@@ -26,7 +26,7 @@ func connectDB(dbPath string) (*dbx.DB, error) {
// (the limits are arbitrary and may change in the future)
//
// @see https://gitlab.com/cznic/sqlite/-/issues/115
db.DB().SetMaxOpenConns(1000)
db.DB().SetMaxOpenConns(800)
db.DB().SetMaxIdleConns(30)
db.DB().SetConnMaxIdleTime(5 * time.Minute)