title: PHP-FPM processes not dying after reaching process_idle_timeout
body: <p>I have a setup of nginx + php-fpm on my server. </p>
  
  <p>FPM's pool configuration looks like this: </p>
  
  <pre><code>[www]
  user                        = root
  group                       = root
  listen                      = /run/php-fpm.sock
  listen.owner                = root
  listen.group                = root
  
  pm                          = ondemand
  pm.max_children             = 50
  pm.process_idle_timeout     = 10s
  pm.max_requests             = 500
  pm.status_path              = /server-status
  
  catch_workers_output        = yes
  </code></pre>
  
  <p>My first expectation is, that no child <code>php-fpm</code> processes are started unless there's an incoming request. Unfortunately, when I start <code>php-fpm</code> I promptly see 2 processes:</p>
  
  <pre><code>10 ?        S      0:00 php-fpm: master process (/etc/php/7.1/fpm/php-fpm.conf)
  37 ?        S      0:00 php-fpm: pool www
  </code></pre>
  
  <p>So, one process is pre-forked for some reason. </p>
  
  <p>My second expectation is that all processes idling for more than 10s will be killed. I run a test which results in the creation of 13 processes. After 1 minute or so (no more requests performed) around 5 processes are idling. Why is it so? </p>