updated db pool limits, added logs VACUUM, updated api docs

This commit is contained in:
Gani Georgiev
2022-11-13 00:38:18 +02:00
parent 39dc1d2795
commit 521df149a2
64 changed files with 650 additions and 751 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(500)
db.DB().SetMaxOpenConns(1000)
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(500)
db.DB().SetMaxOpenConns(1000)
db.DB().SetMaxIdleConns(30)
db.DB().SetConnMaxIdleTime(5 * time.Minute)