Direct answer

First identify the database engine and exact error. With SQLite, database is locked often means another connection has an active write transaction; only one SQLite connection may write at once. Preserve the database before investigating process duplication or plugin write contention.

What it means

SQLite file locking is different from a remote MySQL/MariaDB connection failure. A lock can be caused by overlapping writes, a long-running transaction or separate processes using the same SQLite file. It does not automatically mean corruption.

If you are a player

  • Report the broken plugin feature, error text and approximate time to staff. Avoid repeated actions that create additional writes.

If you run the server

  1. Inspect the first stack trace and plugin configuration. Verify whether the database is SQLite (.db file) or a remote database service; use the matching diagnosis.
  2. Back up the database and any SQLite journal/WAL companion files while the server is cleanly stopped. Do not remove -wal or -shm files by guesswork.
  3. Check for two running server instances or another tool simultaneously writing the same database. Stop the duplicate writer rather than attempting unsafe file unlocks.
  4. If one application generates frequent write contention, consult its documentation for supported connection pool, transaction handling or busy-timeout settings. Only tune settings that plugin actually exposes.
  5. Restart a single server instance, monitor the database log, and confirm expected data remains present.
# Linux: check for duplicate Minecraft Java processes
ps -eo user,pid,args | grep "[j]ava"
# Identify database and related files without changing them:
ls -lah plugins/ExamplePlugin/
Important

Never delete the database to “fix” a lock. A busy-timeout is not a cure for a hung connection or repeatedly failing transactions.

References

Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000