I am using Nginx with Php-fpm (php 5.5 + opcode) for a very high traffic web site, php-fpm status endpoint to monitoring what going on. After a big traffic peak, 200 "active process" are still running despite no more traffic.
Here my php-fpm pool config:
pm.max_children = 1024
pm.start_servers = 32
pm.min_spare_servers = 32
pm.max_spare_servers = 64
pm.max_requests = 500
Here the result of php-fpm status for a "always running" process:
{
pid: 24223,
state: "Running",
start time: 1415881336,
start since: 1307629,
requests: 186,
request duration: 1306169216849,
request method: "GET",
request uri: "/index.php?loca.....",
content length: 0,
user: "-",
script: "/home/ebuildy/app/index.php",
last request cpu: 0,
last request memory: 0
},
This process should be "killed" to be in idle state isnit?
Switch PHP-FPM to ondemand and set the timeout values lower than they currently are.
According to your configuration
pm.min_spare_servers = 32
32 child process will be always idle. If you do not want that switch to ondemand or static mode.