Anomalie #4629
Beaucoup d'inodes mangés dans /var/www sur candidatsfr
Start date:
08/05/2020
Due date:
% Done:
0%
Estimated time:
Difficulté:
2 Facile
Description
Relevé par icinga2.
Je trouve ceci :
(April) root@candidatsfr:/var/www/www.candidats.fr/htdocs/petition/tmp# ls -l | wc -l 207047
Et ça dure depuis le 1er oct 2019.
Je nettoye avec:
find . -type f -size 0 -delete
History
Updated by François Poulain over 3 years ago
Mais on n'a gagné que 3% d'inode donc y en a encore ailleurs.
Updated by François Poulain over 3 years ago
TODO:
- éviter le garbage engendré par ce code
C'était des fichiers du type sess_d1efcsd6n9ifg4al1aa8d1su44.
Updated by François Poulain over 3 years ago
ajouter /var/www au volume dans la conf icinga car ce n'était pas monitoré spécifiquement (seulement globalement).
Done.
Updated by François Poulain over 3 years ago
Visiblement installés depuis var/www/www.candidats.fr/htdocs/petition/index.php :
session_save_path(ROOTDIR . '/tmp');
Je vais ajouter un cron pour virer les fichiers vieux de 30j.
Updated by François Poulain over 3 years ago
En attendant qu'un mainteneur php se penche sur cette app, j'ai fait avec
diff --git a/cron.d/fucking_php b/cron.d/fucking_php new file mode 100644 index 0000000..a5eedd2 --- /dev/null +++ b/cron.d/fucking_php @@ -0,0 +1,2 @@ +# Look for and purge old sessions every 30 minutes +09,39 * * * * root find /var/www/www.candidats.fr/htdocs/petition/tmp -type f -empty -mtime +30 -delete
Updated by Quentin Gibeaux about 3 years ago
- Status changed from Résolu to Fermé
- Assignee set to François Poulain