php-fpm7.0 with ispconfig many users instance running

Discussion in 'Installation/Configuration' started by DonMcCoy, Aug 20, 2016.

  1. DonMcCoy

    DonMcCoy New Member

    Hello Guys,

    I have problem with php-fpm hogging over the ram with many spawned processes for different users (ISPConfig, www-data, webx).
    as you see in the attachment.


    [​IMG]

    is that normal as the whole processes are getting paged in virtual memory, can i only run the instance of the user webx?
    or at least lower the instance count running for each individual user.
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

  3. DonMcCoy

    DonMcCoy New Member

    Hi Jesse, Thanks for this link to the issue, i've changed now all my sites to 'ondemand' and I've started to see far less processes spawned without speed implications on any site.

    but what about the PHP-FPM by ispconfig, apps, www users, could those be changed from the control panel too or i should change them manually from /etc/php/7.0/fpm/pool.d
    ?
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I believe ispconfig itself uses fast-cgi, not php-fpm.
     
  5. DonMcCoy

    DonMcCoy New Member

    that should be right, but why then is 20 child processes of PHP-FPM from ispconfig user and www-data user ?
     

    Attached Files:

  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I checked a debian 8 here, and it is indeed fast-cgi. Guessing you're ubuntu 16? Maybe it runs php-fpm there, I don't know. Try changing it in the config file, then re-run the ispconfig installer and see if it gets overwritten. If so, you might need to copy/create a conf-custom file for that and make the changes there, so they persist through ispconfig updates. (Or wait for someone else to respond who's more familiar with this and can direct otherwise.)
     
  7. DonMcCoy

    DonMcCoy New Member

    Hi Jesse, I have manually changed the php-fpm modes to "ondemand" for the ispconfig user and www-data user.

    ispconfig.conf:
    Code:
    pm = ondemand
    pm.max_children = 10
    pm.process_idle_timeout = 10s;
    pm.max_requests = 0
    and www.conf:
    Code:
    pm = ondemand
    pm.max_children = 35
    pm.process_idle_timeout = 10s;
    pm.max_requests = 0

    Now as you see in the picture the php-fpm processes didn't get respawned again by ispconfig and www-data which is quite logical because it's not needed by those users, only for the php-fpm required sites, so i think the 20 procceses count from pm dynamic was the starting server but they wouldn't get closed after server starting.
    and now memory decreased from 85% to 10% :)

    so you were right that ispconfig is fast-cgi and yes i am ubuntu 16.

    thanks a lot for your kind help
     

    Attached Files:

Share This Page