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

The solution is use ondemand mode in each pool configuration.

Change:

pm = dynamic (or pm = static)

for

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

Code:
;  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.
Cheers!
Reply With Quote