2

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?

2 Answers 2

0

Switch PHP-FPM to ondemand and set the timeout values lower than they currently are.

2
  • Thanks for your answer. Could you elaborate more on why this solves the solution that the poster is observing and the root cause of the behavior? Dec 1, 2014 at 3:08
  • @Sibin you mean it's a normal behavior of "dynamic"? I know static is much better for production env. but I was just testing "dynamic" queue. Dec 1, 2014 at 11:14
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .