Merge pull request #477 from writefreely/fix-sqlite-reader-lock

Fix SQLite database lock on Reader
This commit is contained in:
Matt Baer 2021-06-30 09:56:16 -04:00 committed by GitHub
commit 672fa10b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
app.go
View File

@ -797,7 +797,7 @@ func connectToDatabase(app *App) {
os.Exit(1)
}
db, err = sql.Open("sqlite3_with_regex", app.cfg.Database.FileName+"?parseTime=true&cached=shared")
db.SetMaxOpenConns(1)
db.SetMaxOpenConns(2)
} else {
log.Error("Invalid database type '%s'. Only 'mysql' and 'sqlite3' are supported right now.", app.cfg.Database.Type)
os.Exit(1)