Mercurial > prosody-hg
changeset 13965:b7714c28442f 13.0
mod_storage_sql: Set configurable wait time for locked SQLite3 database
This tells SQLite3 to wait up to 1000 milliseconds (i.e. 1 second) for a
locked database file to become unlocked before giving up.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 30 Sep 2025 16:11:49 +0200 |
| parents | d00409d2329f |
| children | 1b300c5a79d7 67b8f2ee41ed |
| files | plugins/mod_storage_sql.lua |
| diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua Thu Sep 25 16:51:06 2025 +0200 +++ b/plugins/mod_storage_sql.lua Tue Sep 30 16:11:49 2025 +0200 @@ -995,6 +995,8 @@ engine:execute("PRAGMA fullfsync=1;") end + engine:execute(("PRAGMA busy_timeout=%d;"):format(module:get_option_integer("sqlite_busy_timeout_ms", 1000, 0))); + for row in engine:select[[PRAGMA journal_mode;]] do journal_mode = row[1]; end
