Skip to content

Attempt to fix SQLite database locking issues with concurrent access#540

Merged
trungutt merged 1 commit intodocker:mainfrom
trungutt:fix/sqlite-database-locking
Oct 17, 2025
Merged

Attempt to fix SQLite database locking issues with concurrent access#540
trungutt merged 1 commit intodocker:mainfrom
trungutt:fix/sqlite-database-locking

Conversation

@trungutt
Copy link
Copy Markdown
Contributor

@trungutt trungutt commented Oct 17, 2025

Fixes #544.

This PR configures SQLite connections with proper concurrency handling to prevent "database is locked" errors when multiple operations access the database simultaneously.

Details:

  • Add busy_timeout (5s) to wait for locks instead of failing immediately
  • Enable WAL mode for better concurrent read/write performance
  • Configure connection pool to serialize writes (SQLite best practice)

Fixes session store and memory database SQLite implementations.

Configure SQLite connections with proper concurrency handling to prevent
"database is locked" errors when multiple operations access the database
simultaneously.

Changes:
- Add busy_timeout (5s) to wait for locks instead of failing immediately
- Enable WAL mode for better concurrent read/write performance
- Configure connection pool to serialize writes (SQLite best practice)

Fixes session store and memory database SQLite implementations.
@trungutt trungutt requested a review from a team as a code owner October 17, 2025 09:22
@trungutt trungutt changed the title Fix SQLite database locking issues with concurrent access Attempt to fix SQLite database locking issues with concurrent access Oct 17, 2025
Copy link
Copy Markdown
Contributor

@krissetto krissetto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are more sqlite optimizations we could do, but lets get this in for now

@trungutt trungutt merged commit e91b21f into docker:main Oct 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

database is locked

2 participants