Wait briefly when the database is locked.
Section: WAL mode and lock handling
Set a busy timeout
sql
sql
PRAGMA busy_timeout = 5000;Explanation
A practical first-line defense against transient `database is locked` failures.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing WAL mode and lock handling