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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!