I was running into an issue with a vserver where the disk space usage was at 23% but I was getting a 'No space left on device' error message. I run vserver with 12 virtual servers and none of the other servers exhibited the same behavior.
As it turned out the issue was with some PHP applications that were storing their sessions in a per-domain basis rather than in the default /tmp location. For security purposes I isolate/sandbox the sessions within the application root where the www-data user cannot access. The session files were not being cleaned up and one PHP application has been running since 2003 (!).
The real problem: too many files on the ext3 filesystem.
PHP does it's own garbage collection for sessions that have terminated before session_terminate() is called (eg. when a browser is shutdown). However garbage collection is not done on non-standard session directories. As php.ini explains:
I changed directory to the sessions folder and ran the following command to clean up the situation:
php.net: session_save_path()
php.net: session configuration
Garbage Collection
Comments
Post new comment