How do you do deployment PHP applications with enabled OpCache? My situation:
- I have web server with PHP 7.4 and enabled OpCache.
- Server is common virtual 4vCPU + 8GB RAM.
- I use tool Deployer - finished with switch symlink.
- Deployment is many times on day. Usually I deploy 5-10x times small changes.
- Before deploy I have load 3-4.
- After deploy I run
opcache_reset
(curl for http request) and load is >10. Response time is too high.
I understand how Opcache save caches to shared memory in PHP-FPM. But what is the correct solution for deployment without high-load and full availability?