Document restarting PHP after deploying updates (opcache gotcha)
This commit is contained in:
@@ -35,5 +35,18 @@ you are about to run, ideally against a non-critical row/user first.
|
||||
So if your instance is pretty big, commands like `occ files:scan` will time out and fail.
|
||||
- Do not use `occ maintenance:mode --on`, obvious...
|
||||
|
||||
## Deploying updates
|
||||
|
||||
After pulling/copying new code into `nextcloud/apps/occweb/`, restart PHP so
|
||||
the changes actually take effect. `occ app:disable`/`app:enable` is **not**
|
||||
enough — it does not clear PHP's opcode cache, so a stale, cached version of
|
||||
the code can keep running (routes silently 404ing is a typical symptom).
|
||||
Restart the PHP process itself, for example:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart php8.3-fpm # adjust to your installed PHP version
|
||||
sudo systemctl restart apache2 # if PHP runs as an Apache module instead
|
||||
```
|
||||
|
||||
## TODOs:
|
||||
See [open issues](https://github.com/Adphi/occweb/issues)
|
||||
|
||||
@@ -47,5 +47,19 @@ occ-команд.
|
||||
завершаться по таймауту с ошибкой.
|
||||
- Не используйте `occ maintenance:mode --on`, это очевидно...
|
||||
|
||||
## Обновление кода на сервере
|
||||
|
||||
После того как новый код скопирован/спуллен в `nextcloud/apps/occweb/`,
|
||||
обязательно перезапустите PHP, иначе изменения не применятся. `occ
|
||||
app:disable`/`app:enable` **не помогает** — эта команда не сбрасывает
|
||||
opcode-кэш PHP, из-за чего может продолжать работать старая закэшированная
|
||||
версия кода (характерный симптом — маршруты внезапно отвечают 404).
|
||||
Перезапустите сам процесс PHP, например:
|
||||
|
||||
```bash
|
||||
sudo systemctl restart php8.3-fpm # укажите свою версию PHP
|
||||
sudo systemctl restart apache2 # если PHP работает как модуль Apache
|
||||
```
|
||||
|
||||
## Планы (TODO):
|
||||
См. [открытые issues](https://github.com/Adphi/occweb/issues)
|
||||
|
||||
Reference in New Issue
Block a user