Question
Cleaning /var/lib/php/sessions - 100% inodes usage - Ubuntu 16.04
After having issues doing anything on one of my Ubuntu 16.04 droplets due to disc usage errors, I found that I was running out of inodes and there are about 6.2m of them in /var/lib/php/sessions.
I recently updated from PHP 5 to PHP 7, I think this has caused the issue.
My questions are:
What’s the best way to clean sessions from this folder to free up inodes?
How can I prevent this from happening again?
I have this
09,39 * * * * root [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi
in etc/cron.d/php but it doesn’t appear to be working.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×