Add busy_timeout
This commit is contained in:
@ -50,7 +50,7 @@ func main() {
|
||||
ErrorLog: slog.NewLogLogger(logger.Handler(), slog.LevelError),
|
||||
IdleTimeout: time.Minute,
|
||||
ReadTimeout: 5 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
WriteTimeout: 10 * time.Second, // TODO: add conf to make maxVoters limit flexible, and also add for addr
|
||||
}
|
||||
|
||||
go watchForQuitSignals(srv, logger)
|
||||
@ -62,7 +62,7 @@ func main() {
|
||||
}
|
||||
|
||||
func openDb() (*sql.DB, error) {
|
||||
db, err := sql.Open("sqlite3", "./qv.sqlite?_foreign_keys=on")
|
||||
db, err := sql.Open("sqlite3", "./qv.sqlite?_foreign_keys=on&_busy_timeout=5000")
|
||||
if err == nil {
|
||||
err = db.Ping()
|
||||
}
|
||||
|
Reference in New Issue
Block a user