From 4d03280ee51086f05d9cd6d0fd1a72ad4d66a504 Mon Sep 17 00:00:00 2001 From: Elie CHARRA Date: Thu, 12 Sep 2019 16:11:28 +0200 Subject: [PATCH] Disable opcache timestamp validation --- 7.1/rootfs/etc/php/7.1/fpm/conf.d/99-symfony.ini | 5 +++++ 7.2/rootfs/etc/php/7.2/fpm/conf.d/99-symfony.ini | 5 +++++ 7.3/rootfs/etc/php/7.3/fpm/conf.d/99-symfony.ini | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/7.1/rootfs/etc/php/7.1/fpm/conf.d/99-symfony.ini b/7.1/rootfs/etc/php/7.1/fpm/conf.d/99-symfony.ini index 4174ccb..9699ecc 100644 --- a/7.1/rootfs/etc/php/7.1/fpm/conf.d/99-symfony.ini +++ b/7.1/rootfs/etc/php/7.1/fpm/conf.d/99-symfony.ini @@ -4,6 +4,11 @@ opcache.memory_consumption=256 ; maximum number of files that can be stored in the cache opcache.max_accelerated_files=20000 +; In production servers, PHP files should never change, unless a new application version is deployed. +; However, by default OPcache checks if cached files have changed their contents since they were cached. +; This check introduces some overhead that can be avoided as follows: +opcache.validate_timestamps=0 + ; maximum memory allocated to store the results realpath_cache_size=4096K diff --git a/7.2/rootfs/etc/php/7.2/fpm/conf.d/99-symfony.ini b/7.2/rootfs/etc/php/7.2/fpm/conf.d/99-symfony.ini index 4174ccb..9699ecc 100644 --- a/7.2/rootfs/etc/php/7.2/fpm/conf.d/99-symfony.ini +++ b/7.2/rootfs/etc/php/7.2/fpm/conf.d/99-symfony.ini @@ -4,6 +4,11 @@ opcache.memory_consumption=256 ; maximum number of files that can be stored in the cache opcache.max_accelerated_files=20000 +; In production servers, PHP files should never change, unless a new application version is deployed. +; However, by default OPcache checks if cached files have changed their contents since they were cached. +; This check introduces some overhead that can be avoided as follows: +opcache.validate_timestamps=0 + ; maximum memory allocated to store the results realpath_cache_size=4096K diff --git a/7.3/rootfs/etc/php/7.3/fpm/conf.d/99-symfony.ini b/7.3/rootfs/etc/php/7.3/fpm/conf.d/99-symfony.ini index 4174ccb..9699ecc 100644 --- a/7.3/rootfs/etc/php/7.3/fpm/conf.d/99-symfony.ini +++ b/7.3/rootfs/etc/php/7.3/fpm/conf.d/99-symfony.ini @@ -4,6 +4,11 @@ opcache.memory_consumption=256 ; maximum number of files that can be stored in the cache opcache.max_accelerated_files=20000 +; In production servers, PHP files should never change, unless a new application version is deployed. +; However, by default OPcache checks if cached files have changed their contents since they were cached. +; This check introduces some overhead that can be avoided as follows: +opcache.validate_timestamps=0 + ; maximum memory allocated to store the results realpath_cache_size=4096K