Skip to content

Commit 3e32773

Browse files
committed
docs(admin): warn about OPcache delay after enabling maintenance mode
Assisted-by: Cursor:grok-4.7 Signed-off-by: whoalin1 <whoalin414@gmail.com>
1 parent 2de9481 commit 3e32773

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎admin_manual/maintenance/backup.rst‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ Change ``"maintenance" => false`` to ``"maintenance" => true``:
2828

2929
Don't forget to change it back to ``false`` when you are finished.
3030

31+
.. warning::
32+
33+
Enabling maintenance mode updates ``config.php``. With PHP OPcache, other
34+
PHP-FPM / Apache (``mod_php``) workers may keep serving the previous config
35+
until ``opcache.revalidate_freq`` seconds elapse (PHP's default is often
36+
``2``; some installs raise it, for example to ``60``). For scripted backups,
37+
wait at least that long — or reload PHP-FPM / ``mod_php`` — before dumping
38+
the database or copying the data directory, so every web request is truly
39+
in maintenance mode.
40+
41+
Checking ``occ maintenance:mode`` (without ``--on`` / ``--off``) is **not**
42+
enough: CLI PHP starts a fresh process and does not see the web workers'
43+
OPcache. See :doc:`../installation/server_tuning` (Enable PHP OPcache) for
44+
how revalidation settings affect ``config.php`` and maintenance mode.
45+
3146
Backup folders
3247
--------------
3348

0 commit comments

Comments
 (0)