We have been struggling with this problem for over 2 years now. We have an eCommerce shop that uses PHP sessions to store user baskets and other information. The problem is that after a while, the server will run out of disk inodes even if there is plenty of free space left on the server disk. Then it will crash the entire server because we can't write anything on the disk.
We brought this issue to our server management company many times but we're being answered to delete some sessions to free up inodes. The problem is that every time we do this, customers will lose their baskets.
What is the solution to fix this issue? Writing the PHP sessions to the database would require too much major code changes, and we can't increase the inode count without starting over with a different server.
We already have a cron job to delete sessions files that have not been modified in the last month, but this is not enough, and as the website keeps growing, the inodes issues are happening more frequently.