php-fpm stopt with quota error

Discussion in 'Installation/Configuration' started by Steffan, Mar 31, 2022.

  1. Steffan

    Steffan Member

    hello,

    After some client did a update on his site settings php-fpm stopped working.

    ERROR: [pool web1703] failed to chown() the socket '/var/lib/php74-fpm/web1703.sock': Disk quota exceeded (122)

    i know what to do... but isnt there a way to prefent the whole server go offline for this simple quota problem?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Does the whole webserver stop when a single site reaches quota on your system?
     
  3. Steffan

    Steffan Member

    php74 isnt restarting because of this error
    ERROR: [pool web1703] failed to chown() the socket '/var/lib/php74-fpm/web1703.sock': Disk quota exceeded (122)
    So all sites that uses php74 stops working
    Apache is starting normaly ( i believe)
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    So probably because the web user exceeds the quota, it doesn't work... that's problematic
     
  5. Steffan

    Steffan Member

    Yes tell me abouth it :-(
    The 0 byte .sock cant be generatie
    So the config file gives an error on loading
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The question is if there is a way to avoid that, for security reasons, the socket must be owned by the user that runs the PHP process so that other websites can't connect to it, so it must be owned by the webID user. Not using a socket is possible, but it's slower and insecure as other applications might connect o the network port to run PHP applications under a different user, so not a good idea. Maybe it's possible to put each socket in a different directory and prevent access to it by setting strict directory permissions while using a global user like www-data as owner for the socket?
     
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Sockets under /run could work on Debian systems; surely centos derivatives use that or /var/run or similar?
     
    ahrasis likes this.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    This might indeed be an option or another separate partition without quota for the socket directory.
     
  9. michelangelo

    michelangelo Active Member

    RHEL >= 7 uses /run and for compatibility reasons /var/run symlinks to /run too.
     
    Last edited: Apr 1, 2022
  10. Steffan

    Steffan Member

    Its an old tread, but today i had the same problem again.

    Code:
    ERROR: [pool web1885] failed to chown() the socket '/var/lib/php74-fpm/web1885.sock': Disk quota exceeded 
     
  11. michelangelo

    michelangelo Active Member

    A little more information would be helpful!

    What filesystem? Is selinux disabled or is it in not enforcing mode? What is the disk-usage for /var?
     
  12. pyte

    pyte Well-Known Member HowtoForge Supporter

    You could just workaround that issue if you use a seperate disk for /var/www/. Enable quotas on that Disk and disable it on the one that contains the rest of /var/.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Or you could try to remount /var/lib/php74-fpm folder (to a filesystem without quota), e.g. it might be worth a try to mount it as tmpfs or RAM disk. The sockets get created when php-fpm starts and get removed when it stops, so it should not hurt when the content of that folder vanishes on reboot.
     
    pyte likes this.

Share This Page