Page 1 of 1

nginx+php-fpm change to ondemand mode

Posted: Wed Feb 17, 2016 11:58 pm
by cybaster85
Dear Everyone

i was previously using kloxo-mr and all the while using php-fpm onemand instead of dynamic mode to save some ram

however, i notice there are several php.fpm.conf in vestacp, which is the one i should edit to apply ondemand to all domain and user?

i found them at /usr/local/vestacp/conf/fpm.d/php-fpm.conf and defatut.conf and /etc/php-fpm/php-fpm.conf.d/*.conf

appreciate if any help provided

Re: nginx+php-fpm change to ondemand mode

Posted: Thu Dec 01, 2016 5:21 pm
by Aldoseri
For existing servers or domains edit all files in the pool.d directory including www

/etc/php5/fpm/pool.d/domain.tld.conf

also add this: pm.process_idle_timeout = 10s

- Then restart php5-fpm and nginx servers.

to have this as a default for new domains, edit these 2 files

1- /usr/local/vesta/data/templates/web/php-fpm/default.tpl
2- /usr/local/vesta/data/templates/web/php-fpm/socket.tpl

don't forget pm.process_idle_timeout = 10s

Restart php-fpm and nginx