WEB

Clear Cache REDIS

La commande suivante est à lancer pour chaque site dans le répertoire du site, et sur chacun des 3 serveurs web en tant que l'utilisateur apache (ou www-data ou admin-apache)

Exemple comment exécuter la commande :

sudo -u login  php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod

cd /production/questions
php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod
cd /production/ezplatform
php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod
cd /production/ezplatform
php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod
cd /production/ezplatform
php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod
cd /production/ezplatform
php bin/console cache:clear --env=prod && php bin/console cache:pool:clear cache.redis --env=prod

Varnish clean cache

rm -rf /production/www/var/cache/* && systemctl restart rh-varnish5-varnish && systemctl restart httpd && systemctl restart rh-php73-php-fpm.service && systemctl restart rh-redis5-redis
su - LOGIN


cd /production/www/current/docroot
/opt/rh/rh-php73/root/bin/php bin/console cache:clear --no-warmup --env=prod -vvv && /opt/rh/rh-php73/root/bin/php bin/console cache:pool:clear cache.redis --env=prod -vvv

image.png

Error PHP

PHP Fatal error:  Uncaught RuntimeException: Failed to start the session

Open the Varnish configuration file: 
/etc/varnish/default.vcl or /etc/varnish/varnish.params

You should see a line similar to the following in your configuration file:

# set the size of the cache in MB
set max_cache_size = 256M;

Increase the cache size:

set max_cache_size = 512M;

Save the configuration file and restart Varnish

PHP-FPM

Ajustement de la sonde Centreon : 
Lin_Process_php-fpm_pool
- Min : 24
○ Car dans le fichier de configuration c'est le nombre de process lancé au démarrage
- Max : 200
○ Car le maximum dans le fichier de configuration est 256

Fichier de conf : /etc/php/7.4/fpm/pool.d/www.conf