php-fpm questions

Discussion in 'ISPConfig 3 Priority Support' started by craig baker, May 21, 2019.

  1. craig baker

    craig baker Member HowtoForge Supporter

    I've been wrestling with some nextcloud performance issues (SLOOOOOOW UPLOADS!) and I changed from fastcgi to php-fom after installing several php versions.
    I'm using php72 but I note some things that concern me.
    in the php-fpm.d pool directory there is a www.conf as well as the web3.conf (that is created by ispconfig). www.conf refers to user and group 'www-data' which I dont use at all. and causes errors unless you add a rather pointless www-data user to the system just to make it happy! is it safe to simply delete this file? or should the user in it need to change to for example web2 or web3 that are generated by ispconfig?

    also - in my php72 file web3.conf we see:
    listen = /var/lib/php5-fpm/web3.sock
    why is this not php7? is this a problem or just cosmetic? I belive if I were to use a different php version 5.6 say would we not wind up having multiple php servers using this same socket?

    also, my sever has LOTS of mamory. 144gb. and a dual hex-core xeon. I've upped to php-fpm defaults to

    pm = dynamic
    pm.max_children = 64
    pm.start_servers = 24
    pm.min_spare_servers = 24
    pm.max_spare_servers = 48
    pm.max_requests = 0

    anything else I can do to improve nextcloud performance?

    webdav attaches to it through a client raidrive - free opensource and seems to be well though ot.
    but uploading files to the server take - almost literally - forever! 100mb of files would take hours if not days. internet is not slow.

    any ideas? or how to find out what the bottleneck is?

    many thanks o Great Till :)
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The www.conf should be there and any Ubuntu and Debian system has a www-data user. if you use CentOS, then change www-data to the user that rund the web server.

    no.

    The system is in a data center, so it has a symmetrical internet connection where up- and download speed is equal and e.g. 1GB?

    I don't think that the upload speed problem is caused by PHP mode or any FPM settings or amount of memory. If FPM settings would be too low, then you would get errors in the way that requests are denied, you won't get slow uploads.
     
  3. craig baker

    craig baker Member HowtoForge Supporter

    when you add a new php version in /opt/phpxx I note in the /etc/php.fpm.d folder. when you set a site at php-fpm, it makes webxx.conf - (xx is the user, and I just renamed the original www.conf rather than add a bogus www-data user)
    but the file contains the line:
    listen = /var/lib/php5-fpm/web84.sock

    all additional php versions seem to want to share this same sock file. is this by design?
    does it matter?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Each website has it's own socket file, the PHP version does not matter here. So there is one socket file per website and not one socket file per PHP version. Removing the www.conf file might cause reload problems with php-fpm as there must be at least one active pool, that's why we add it and that's why I won't remove it on my servers and the user has to be www-data and not a web user in the www.conf file.
     

Share This Page