From 43b7cc2d5dbe72985f29349a3c4ed5e7009ce72e Mon Sep 17 00:00:00 2001 From: Roman Prilipskii Date: Tue, 2 Jun 2026 08:17:03 -0400 Subject: [PATCH] CLOS-4253: Document that SQLite WAL journal mode is unsupported for lvestats2.db In WAL mode SQLite must write the root-owned -shm sidecar even for SELECT, so unprivileged, CageFS-isolated readers (cloudlinux-statistics, lveinfo) fail with "attempt to write a readonly database". Only the default DELETE journal mode is supported; the lve-stats daemon now resets a WAL-configured database back to DELETE on startup. Add a warning note to the LVE Stats component docs. Co-Authored-By: Claude Opus 4.8 --- docs/cloudlinuxos/cloudlinux_os_components/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/cloudlinuxos/cloudlinux_os_components/README.md b/docs/cloudlinuxos/cloudlinux_os_components/README.md index 5e73a597b..5e7062043 100644 --- a/docs/cloudlinuxos/cloudlinux_os_components/README.md +++ b/docs/cloudlinuxos/cloudlinux_os_components/README.md @@ -81,6 +81,12 @@ Settings of old lve-stats (ver. 0.x) are import SQLite database file is located in `/var/lve/lvestats2.db`, data from old lve-stats (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, SQLite DB stable migration is provided. +:::warning +The SQLite `WAL` journal mode is **not supported** for `/var/lve/lvestats2.db`. The LVE Stats daemon runs as `root` and is the only writer, while statistics are read by unprivileged, per-user (CageFS-isolated) processes such as `cloudlinux-statistics` and `lveinfo`. In `WAL` mode SQLite must write the `root`-owned `-shm` sidecar file even for read-only queries, so those non-root readers fail with `attempt to write a readonly database`. + +Only the default `DELETE` journal mode is supported. If you previously set `PRAGMA journal_mode=WAL` on the database, the daemon automatically resets it back to `DELETE` on startup — run `service lvestats restart` to apply the fix. +::: + Currently, the new lve-stats supports all databases available in CloudLinux OS. :::tip Note