Skip to content

Commit 44a4d96

Browse files
authored
Merge pull request #325 from prilr/CLOS-4253-support-wal-journal-mode-for-lvestats2.d
CLOS-4253: Document that SQLite WAL journal mode is unsupported for lvestats2.db
2 parents da2a15e + 43b7cc2 commit 44a4d96

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • docs/cloudlinuxos/cloudlinux_os_components

docs/cloudlinuxos/cloudlinux_os_components/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ Settings of old <span class="notranslate">lve-stats</span> (ver. 0.x) are import
8181

8282
SQLite database file is located in <span class="notranslate">`/var/lve/lvestats2.db`</span>, data from old <span class="notranslate">lve-stats</span> (ver. 0.x) are being migrated automatically in the background. Migrating process can last 2-8 hours (during this time lags are possible when admin is trying to check statistics, at the same time users will not be affected). Migrating the latest 30 days, <span class="notranslate">SQLite DB</span> stable migration is provided.
8383

84+
:::warning
85+
The <span class="notranslate">SQLite</span> `WAL` journal mode is **not supported** for <span class="notranslate">`/var/lve/lvestats2.db`</span>. The <span class="notranslate">LVE Stats</span> daemon runs as `root` and is the only writer, while statistics are read by unprivileged, per-user (CageFS-isolated) processes such as <span class="notranslate">`cloudlinux-statistics`</span> and <span class="notranslate">`lveinfo`</span>. In `WAL` mode <span class="notranslate">SQLite</span> must write the `root`-owned <span class="notranslate">`-shm`</span> sidecar file even for read-only queries, so those non-root readers fail with `attempt to write a readonly database`.
86+
87+
Only the default `DELETE` journal mode is supported. If you previously set <span class="notranslate">`PRAGMA journal_mode=WAL`</span> on the database, the daemon automatically resets it back to `DELETE` on startup — run <span class="notranslate">`service lvestats restart`</span> to apply the fix.
88+
:::
89+
8490
Currently, the new <span class="notranslate">lve-stats</span> supports all databases available in CloudLinux OS.
8591

8692
:::tip Note

0 commit comments

Comments
 (0)