php-fpm default process manager

Discussion in 'General' started by pititis, May 4, 2012.

  1. pititis

    pititis Member


    I did some test and research with nginx + php-fpm using process manager in ondemand mode. Is just a dream!

    There aren't children at startup (0). Using dynamic mode and a few customers you are lost, tons of process will eat your memory.

    ondemand is amazing, children are forked with new connections and after timeout, return to 0!! Default idle_timeout is set in 10 seconds!!!

    Please consider ondemand for ispconfig.

  2. falko

    falko Super Moderator ISPConfig Developer

  3. pititis

    pititis Member

    Ok thanks for the link.
  4. falko

    falko Super Moderator ISPConfig Developer

    I've implemented this (in SVN) yesterday. But the default process manager is still dynamic because for ondemand, you need PHP version 5.3.9 or newer.

    I've added a drop-down field where you can select static, dynamic, or ondemand.
  5. pititis

    pititis Member

    Thank you so much!!

    Good point. A drop-down is a nice idea for support all pm modes.

    I'm using precise :D
  6. HellMind

    HellMind New Member

    I still want a way to set everything to on demand
    and by default too
  7. JeffryL

    JeffryL New Member

    Same here... is it possible to set php-fpm ondemand by default?
  8. HellMind

    HellMind New Member

    I did a query to update every site to that.
    But dunno if its working.
  9. JeffryL

    JeffryL New Member

    Okay that's a way too of course... is it safe to perform? ;)
  10. HellMind

    HellMind New Member

    We must summon support.
    Let me say a few magic words

    "Come on and rock me Amadeus"

  11. falko

    falko Super Moderator ISPConfig Developer

    You can copy /usr/local/ispconfig/server/conf/php_fpm_pool.conf.master to /usr/local/ispconfig/server/conf-custom/ and then adjust /usr/local/ispconfig/server/conf-custom/php_fpm_pool.conf.master to your needs - it will override the default template.
  12. JeffryL

    JeffryL New Member

    Hi Falko, if I change this:

    pm = <tmpl_var name='pm'>

    pm = ondemand
    it works, but in that case it isn't possible to edit the settings through the panel anymore right? Is there also a place for a default setting or am I doing something wrong nonetheless?
  13. Did you figure this out?

    I'm in the same situation right now, about to change the master template to not be compatible with some of the functionality of ispconfig, but i'm not sure that's really what I like... Maybe it could just be set when a website is added? that way it is still possible to change afterwards.
  14. BrianJM

    BrianJM New Member

    I am also trying to figure out the same thing.
  15. Jesse Norell

    Jesse Norell Active Member

  16. Yes, I figured it out in the end.

    You will have to edit the database directly to set "ondemand" as primary value:

    DB record:
    edit master database ( eg: dbispconfig)
    table: web_domain

    Edit structure: (not the records, but the structure! (in phpmyadmin it is called: "Structure" and is located next to "Browse" when you have an overview of the database))

    Change the default value of "dynamic" to "ondemand" and save.

    I'm not a devver, but I'm sure someone can make a SQL query that would do this for you ;-)
    Jesse Norell likes this.
  17. Jesse Norell

    Jesse Norell Active Member

    alter table web_domain alter pm set default 'ondemand';
    I confirmed this does change the default mode of a new site. It's sufficient to run that alter on the ispconfig control panel node, and it will propogate that setting (by value, not alter the db schema) to any slave web server nodes.

    I suppose it remains to be seen if this persists through an ispconfig update, but nice and easy for a short-term quick fix.
    Last edited: Aug 23, 2016

Share This Page