How to resolve OpenLiteSpeed’s No space left on device
The error occurred in one of our PHP servers which hosts multiple PHP websites. When accessing one of the websites we got a 503 HTTP error…
The error occurred in one of our PHP servers which hosts multiple PHP websites. When accessing one of the websites we got a 503 HTTP error. When we checked the log we got this error:
Failed to listen socket [/tmp/lshttpd/appname.sock]: No space left on device
If you wondering where the log is located. It’s on:
$ cd /usr/local/lsws/logs
Then you can tail on one of the latest files to see the errors.
In conclusion, the error was because our `/tmp` partition was full due to the PHP session is not cleared for a long time.
Solution:
find -O3 "/tmp" -ignore_readdir_race -depth -mindepth 1 -name 'sess_*' -type f -cmin +180 -delete