You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Add busy_timeout to SQLite connections to prevent lock errors
Problem:
- Getting "database is locked" errors during concurrent operations
- Archive worker reading large datasets while crawler tries to write
- SQLite was failing immediately instead of waiting for lock
Solution:
Add _busy_timeout=5000 (5 seconds) to all SQLite connection strings
- SQLite will now retry for 5 seconds before returning "database is locked"
- Handles brief lock contention from concurrent read/write operations
- WAL mode already allows concurrent reads, this handles write conflicts
Expected behavior:
- Fewer "database is locked" errors
- Operations will wait briefly for locks to be released
- Only fail if lock held for more than 5 seconds (indicates real deadlock)
0 commit comments