Sqlite: Increase busy_timeout to 7.5s for non-cgo driver (#111883)

This commit is contained in:
Matheus Macabu 2025-10-01 18:18:44 +02:00 committed by GitHub
parent f01b1131e7
commit 1bd7725a10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ func convertSQLite3URL(dsn string) (string, error) {
newDSN := dsn[:pos] newDSN := dsn[:pos]
q := url.Values{} q := url.Values{}
q.Add("_pragma", "busy_timeout(5000)") q.Add("_pragma", "busy_timeout(7500)") // Default of mattn/go-sqlite3 is 5s but we increase it to 7.5s to try and avoid busy errors.
for key, values := range params { for key, values := range params {
if alias, ok := dsnAlias[strings.ToLower(key)]; ok { if alias, ok := dsnAlias[strings.ToLower(key)]; ok {