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?

0

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

  • 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? – Michael Lowman Dec 1 '14 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. – Thomas Decaux Dec 1 '14 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.