Thread: Nginx + php-fpm
View Single Post
Old 9th July 2013, 21:00
pititis pititis is offline
Senior Member
Join Date: Dec 2010
Location: München
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts

The solution is use ondemand mode in each pool configuration.


pm = dynamic (or pm = static)


pm = ondemand

and restart fpm.

ondemand mode needs (PHP Version >= 5.3.9)

Also see the pm.max_children and pm.process_idle_timeout directives if you choose ondemand mode

;  ondemand - no children are created at startup. Children will be forked when
;             new requests will connect. The following parameter are used:
;             pm.max_children           - the maximum number of children that
;                                         can be alive at the same time.
;             pm.process_idle_timeout   - The number of seconds after which
;                                         an idle process will be killed.
Reply With Quote