Question

Openlitespeed 503 - lsphp states: no space left on device but there is enough free space available on the server

Posted June 7, 2020 159 views
OpenLiteSpeed WordPress 1-Click

I set up a server following the tutorial on: https://docs.litespeedtech.com/cloud/images/wordpress

I regularly get a 503 error; when I check the logs I see the following:

ERROR   [lsphp]: Failed to listen socket [/tmp/lshttpd/lsphp.sock]: No space left on device
WARN    [uds://tmp/lshttpd/lsphp.sock] Can not start this external application.

However, there is plenty of space left when I check:

Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           395M  628K  394M   1% /run
/dev/vda1        78G  6.7G   71G   9% /
tmpfs           2.0G  1.2M  2.0G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda15      105M  3.6M  101M   4% /boot/efi
/dev/loop0      1.5G   25M  1.3G   2% /tmp
tmpfs           395M     0  395M   0% /run/user/0

Also, the image should have set the following limits:

Max SSL Connections 5000    10000
lsphp Max Connections   35  100
PHP_LSAPI_CHILDREN  35  100

However my limit are this:

max ssl connections 1000 (not even the 5000 as it should been standard?)
lsphp Max Connections 35
PHP_LSAPI_CHILDREN=35

How come the image didn’t set those and can I just change them via the webadmin console?

Thanks.

Regards,

1 comment

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.

×
3 answers

Hi there @m86,

It sounds like that your inodes might be full. To check that run the following command:

  • df -i

This usually happens when there is a huge number of small files, that way you have enough disk space but no available inodes, so you would still not be able to add any new files.

If this is the case you need to find the directory which is those files are being created at and delete them.

More often than not this is caused by temporary session files created by your application and then not being removed.

If you are not able to find the directory in question, try running this command here:

  • find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n

Note that it might take a while.

Let me know how it goes!
Regards,
Bobby

  • Hi,

    Thanks for your suggestions.

    When I run df -i I see the following:

    Filesystem       Inodes  IUsed    IFree IUse% Mounted on
    udev             501655    385   501270    1% /dev
    tmpfs            504912    569   504343    1% /run
    /dev/vda1      10321920 122169 10199751    2% /
    tmpfs            504912     10   504902    1% /dev/shm
    tmpfs            504912      3   504909    1% /run/lock
    tmpfs            504912     18   504894    1% /sys/fs/cgroup
    /dev/vda15            0      0        0     - /boot/efi
    /dev/loop0        96000   1467    94533    2% /tmp
    tmpfs            504912     11   504901    1% /run/user/0
    

    So I don’t think it’s that, as most of the usage is below 2%…

    Regards,

    • Hi there @m86,

      Yes indeed, your inodes seem all good.

      Can you share the output of following command as well:

      • sudo ipcs -a

      I’ve seen a similar problem in the past where several semaphores were left open. If there are too many you would need to clear them a little bit with the ipcrm -s semid.

      Note that you need to change the semid with he actual ID.

      Let me know how it goes.
      Regards,
      Bobby

      • Thanks, I really appreciate you looking into this.

        Here is the output:

        ------ Message Queues --------
        key        msqid      owner      perms      used-bytes   messages    
        
        ------ Shared Memory Segments --------
        key        shmid      owner      perms      bytes      nattch     status      
        
        ------ Semaphore Arrays --------
        key        semid      owner      perms      nsems   
        

        Regards,

Hey. Could not solve the problem?
I have exactly the same problem, the server often crashes …

After a reboot, after a couple of days of work, the server again crashes and the error logs:

[ERROR] [abudhab.655340]: Failed to listen socket [/tmp/lshttpd/abudhab.sock]: No space left on device
[WARN] [UDS://tmp/lshttpd/abudhab.sock] Can not start this external application.

df -i and sudo ipcs -a have similar values, inodes use 1% and ipcs is empty…

I was able to “fix” this, by upping the numbers manually in openlitespeed:

Max SSL Connections 10000
lsphp Max Connections 100
PHPLSAPICHILDREN 100

Submit an Answer