Skip to content

Commit b71d4f5

Browse files
retlehsclaude
andcommitted
Increase SQLite busy_timeout from 5s to 30s
Pipeline was failing with SQLITE_BUSY because OG image generation from crawler traffic was holding write locks longer than the 5s timeout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fd8a746 commit b71d4f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/db/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func Open(dbPath string) (*sql.DB, error) {
1515
return nil, fmt.Errorf("creating db directory: %w", err)
1616
}
1717

18-
dsn := fmt.Sprintf("file:%s?_pragma=journal_mode(WAL)&_pragma=synchronous(NORMAL)&_pragma=foreign_keys(ON)&_pragma=busy_timeout(5000)&_pragma=mmap_size(268435456)&_pragma=cache_size(-65536)", dbPath)
18+
dsn := fmt.Sprintf("file:%s?_pragma=journal_mode(WAL)&_pragma=synchronous(NORMAL)&_pragma=foreign_keys(ON)&_pragma=busy_timeout(30000)&_pragma=mmap_size(268435456)&_pragma=cache_size(-65536)", dbPath)
1919

2020
db, err := sql.Open("sqlite", dsn)
2121
if err != nil {

0 commit comments

Comments
 (0)