# 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 :

<span style="color: rgb(230, 126, 35);">sudo -u login php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>

<span style="color: rgb(230, 126, 35);">cd /production/questions</span>  
<span style="color: rgb(230, 126, 35);">php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>  
<span style="color: rgb(230, 126, 35);">cd /production/ezplatform</span>  
<span style="color: rgb(230, 126, 35);">php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>  
<span style="color: rgb(230, 126, 35);">cd /production/ezplatform</span>  
<span style="color: rgb(230, 126, 35);">php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>  
<span style="color: rgb(230, 126, 35);">cd /production/ezplatform</span>  
<span style="color: rgb(230, 126, 35);">php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>  
<span style="color: rgb(230, 126, 35);">cd /production/ezplatform</span>  
<span style="color: rgb(230, 126, 35);">php bin/console cache:clear --env=prod &amp;&amp; php bin/console cache:pool:clear cache.redis --env=prod</span>

# Varnish clean cache

```bash
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
```

```bash
su - LOGIN
```

```bash
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](https://cavallone.fr/uploads/images/gallery/2024-10/scaled-1680-/8JcotVNXD3WzUg1u-image.png)](https://cavallone.fr/uploads/images/gallery/2024-10/8JcotVNXD3WzUg1u-image.png)

# Error PHP

<p class="callout danger">PHP Fatal error: Uncaught RuntimeException: Failed to start the session</p>

Open the Varnish configuration file:   
<span style="color: rgb(45, 194, 107);">/etc/varnish/default.vcl or /etc/varnish/varnish.params</span>

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

\# set the size of the cache in MB  
<span style="color: rgb(230, 126, 35);">set max\_cache\_size = 256M;</span>

<span style="color: rgb(230, 126, 35);">Increase the cache size:</span>

<span style="color: rgb(230, 126, 35);">set max\_cache\_size = 512M;</span>

Save the configuration file and restart Varnish

# PHP-FPM

<div id="bkmrk-ajustement-de-la-son">Ajustement de la sonde Centreon : </div><div id="bkmrk-lin_process_php-fpm_"><span style="color: rgb(53, 152, 219);">Lin\_Process\_php-fpm\_pool</span></div><div id="bkmrk---min-%3A-24">- Min : 24</div><div id="bkmrk-%E2%97%8B-car-dans-le-fichie">○ Car dans le fichier de configuration c'est le nombre de process lancé au démarrage</div><div id="bkmrk---max-%3A-200">- Max : 200</div><div id="bkmrk-%E2%97%8B-car-le-maximum-dan">○ Car le maximum dans le fichier de configuration est 256</div><div id="bkmrk-">  
</div><div id="bkmrk-fichier-de-conf-%3A-%2Fe">Fichier de conf : <span style="color: rgb(45, 194, 107);">/etc/php/7.4/fpm/pool.d/www.conf</span></div>