SQLite locked (SQLITE_BUSY: database is locked)
- Platforms
- Paper · Purpur · Velocity · single server
- Verified
- Verified
- Confidence
- Confidence 80%
What it looks like in the log
Any one of these lines is enough. The agent matches them locally, on your server.
logs/latest.log
[WARN] database is locked
Symptoms
- A plugin's writes to SQLite fail: “[SQLITE_BUSY] The database file is locked (database is locked)”
Cause
The SQLite file is held by another transaction or process for longer than busy_timeout: the plugin writes from several threads/connections, or the file is open in another process.
Possible causes
- The plugin holds several connections to the same SQLite file and writes concurrently (a long transaction blocks the others)
- The database file is open in another process: a second server instance on the same folder, a backup/sync tool, an external database viewer
- Slow disk/network file system (NFS, SMB) — SQLite locking works poorly or slowly
How to fixLow risk
- Make sure only one process uses the server folder (no second running instance, no external programs with the
.dbopen). - Do not keep SQLite files on network drives; move the server to a local disk.
- Disable backups that copy
.dbfiles while live, or run them with the server stopped. - For a network of servers or large data volumes, switch the plugin to MySQL/MariaDB — SQLite is designed for a single process.
- If the error is in a single plugin, update it; report it to the author if it writes to SQLite from several threads.
Translated from the Russian original; log lines are quoted verbatim.