503 error + [lsphp]: Failed to listen socket [/tmp/lshttpd/lsphp.sock]: No space left on device

m86

New Member
#1
Hello,

Once very few days I get a 503 error on my wordpress installed openlitespeed server.

When I check the logs it states: [lsphp]: Failed to listen socket [/tmp/lshttpd/lsphp.sock]: No space left on device

However there's plenty space left.

When I restart litespeed, the error goes away.

I'm also not able to login to the openlitespeed panel on 7080 during that 503.

I used the standard installation of https://docs.litespeedtech.com/cloud/images/wordpress/ and the site that's hosted on there rarely gets traffic, so that can't be an issue...

Regards,
 
#2
Same error. Can't execute any php it says no space left on device....

I tried restarting lsws but it still doesn't work. This is the second time already that openlitespeed updates are causing errors for wordpress installations.

This is unacceptable....
 

m86

New Member
#3
It helped when I changed the following values:

Max SSL Connections from 5000 to10000
lsphp Max Connections from 35 to 100
PHP_LSAPI_CHILDREN from 35 to 100
 

m86

New Member
#5
Problems were gone for a while, but now they are back. This is a serious thing, which makes us regret using litespeed in the first place.
Better than apache? if it works yeah, but it doesn't.
 

lky

New Member
#7
Problems were gone for a while, but now they are back. This is a serious thing, which makes us regret using litespeed in the first place.
Better than apache? if it works yeah, but it doesn't.
You are getting No space left on device message because /tmp partition full due to PHP session not cleared for a long time.
Please set up a cronjob with the below code.

systemctl stop phpsessionclean.service
systemctl disable phpsessionclean.service
systemctl stop phpsessionclean.timer
systemctl disable phpsessionclean.timer
*/30 * * * * find -O3 "/tmp" -ignore_readdir_race -depth -mindepth 1 -name 'sess_*' -type f -cmin +180 -delete
 

gilles

Active Member
#9
It would be great if the error message could be tweaked to be a little more meaningful.

@lky, could you explain why the phpsessionclean service/timer are not enough to do the cleaning job?
@Cold-Egg, is there a reason this is not part of OLS setup if it is necessary?

@margin707, you will run into issues running your own server. Many settings are dependent on what type of site(s) you're running. I wish there were a few more complete examples of setup for different types of sites (static low-bandwidth, static high-bandwidth, commerce low-bandwidth, commerce high-bandwidth, ...). OLS is newer than Apache / Nginx, so there are probably more bugs that have not been found yet and rough corners that have not been ironed out.
 

Cold-Egg

Administrator
#10

gilles

Active Member
#11
@Cold-Egg: Here is what I have in mind:
1) If /tmp is full because of the session files left by lsphp, then it would seem OLS should clean them up on a regular basis.
2) Maybe it's obvious to experienced users that it's the /tmp that's full. The message could be a little more explicit. Most users will think that /tmp is part of the main drive partition and look there, see it's not full, and will be confused and won't know what to do.

I have not experienced /tmp full myself yet. I'm running OLS with Cyberpanel, which may be doing some cleanup.
I have experienced disk corruptions on the /tmp filesystem and had to reformat it recently to fix these issues. Not sure how the corruptions happen.

Thank you for all the support you provide.
 
#12
You are getting No space left on device message because /tmp partition full due to PHP session not cleared for a long time.
Please set up a cronjob with the below code.

systemctl stop phpsessionclean.service
systemctl disable phpsessionclean.service
systemctl stop phpsessionclean.timer
systemctl disable phpsessionclean.timer
*/30 * * * * find -O3 "/tmp" -ignore_readdir_race -depth -mindepth 1 -name 'sess_*' -type f -cmin +180 -delete
Hi there,
My server is also having the issue outlined by OP.

This solution posted by @iky isn't making total sense to me. There are four bash command, and a seemingly unrelated crontab entry. What's the relationship between the two? Are you saying, first run those bash commands (and I presume one has to therefore run them every time the server is restarted?), and set up the stated crontab entry?
 

lky

New Member
#13
Hello inspiredearth,

Generally, the below solutions can solve your issue. you can ignore systemctl commands mentioned in my previous reply.
I have disabled phpsessionclean services because those service not cleaning session files without making changes in php.ini
1. session files by cronjob, you can change +180 to desired minutes.
*/30 * * * * find -O3 "/tmp" -ignore_readdir_race -depth -mindepth 1 -name 'sess_*' -type f -cmin +180 -delete
2. Change MySQL tmpdir path in my.cnf
tmpdir = /var/lib/mysql #whatever path you like
3. Change OLS SWAP space directory
https://serverok.in/openlitespeed-move-swapping-directory
 
Top