Type “help” for hints, ↑ for history.
df -h showed 22 GB free, but df -i: 0 free inodes. Each PHP session is a file; the
extranet pool writes them to /srv/extranet/sessions (value set by php_admin_value). On Ubuntu,
session.gc_probability = 0: PHP never cleans up by itself, it relies on phpsessionclean,
which only knows /var/lib/php/sessions. Result: 2.6 million files since March.
The disk is not full (no need to enlarge it), FPM was healthy (“idle: 9”), and the static page worked over HTTPS: it is not the certificate.
Incident resolved
Analysis and fix
Immediate fix: delete only the expired sessions, without touching the active ones:
find /srv/extranet/sessions -type f -name 'sess_*' -mmin +1440 -delete, then check df -i and logging in.
Prevention:
- a dedicated systemd timer (or cron job) that purges
/srv/extranet/sessionsevery 30 minutes, or add this path to the cleanup; or else store sessions in Redis; - monitor inodes (
df -i) and not only disk space: alert at 80 %; - document that any custom
session.save_pathvalue must have its own cleanup.