mirror of
https://github.com/mimamch/wa-multi-session.git
synced 2026-04-25 08:45:59 +03:00
[GH-ISSUE #61] Intermittent SQLITE_BUSY or Lock Contention when Multiple Sessions are Active (High Load) #43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidgoweb on GitHub (Nov 24, 2025).
Original GitHub issue: https://github.com/mimamch/wa-multi-session/issues/61
1. The Problem
As
wa-multi-sessionscales up to manage many active sessions, the database is highly likely to encounter write contention (multiple sessions trying to save data simultaneously). This results in cripplingSQLITE_BUSYerrors, causing data loss and session instability.The problem comes from frequent writes for logging messages and updating session status, not the infrequent creation/deletion of sessions.
2. The Solution: Critical Configurations
We need to proactively enforce the best practices for SQLite concurrency:
Use WAL (Write-Ahead Logging) Mode
PRAGMA journal_mode = WAL;on the database connection.@mimamch commented on GitHub (Nov 24, 2025):
Hi @davidgoweb, thank you so much for your very helpful feedback. I will looking further about what you said above soon and write the update on this issue. 🔥
@mimamch commented on GitHub (Nov 25, 2025):
Thank you @davidgoweb, fixed on #62