-
Notifications
You must be signed in to change notification settings - Fork 0
w-autoheal: opcache-tune must not set validate_timestamps=0 on non-production projects #1
Copy link
Copy link
Open
Description
OPcache not invalidated after file changes
Problem
opcache.validate_timestamps=0 is set globally by w-autoheal opcache-tune. This is correct for production but breaks development workflows and any deployment: PHP serves stale compiled bytecode until FPM is manually restarted.
Expected behavior
After any file change (git pull, composer install, artisan command), OPcache should be invalidated and FPM restarted automatically — regardless of whether APP_ENV is production or local.
Proposed fix
w-autoheal opcache-tuneshould setvalidate_timestampsbased onAPP_ENVper pool:0for production,1for local/staging- Add a new script
w-deploy(or a--post-deployflag onw-autoheal) that:- Clears Laravel caches (
composer w-cacheor artisan sequence) - Resets OPcache via
cachetoolorkill -USR2on the FPM master - Restarts the relevant
phpX.Y-fpmpool gracefully
- Clears Laravel caches (
- Should detect the correct PHP version per project from the HestiaCP pool config
Affected scripts
w-autoheal.sh—opcache-tunefixw-perf-report.sh— should warn whenvalidate_timestamps=0on a project withAPP_ENV != production
Environment
- HestiaCP / Debian 12
- PHP 8.4 FPM, multiple pools (one per domain)
- Mixed dev + prod projects on same server
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels