Welcome! Log In Create A New Profile

Advanced

pool get unavailable

Posted by Jonas Genannt 
Jonas Genannt
pool get unavailable
March 11, 2014 05:38AM
Hello,

I'm using PHP FPM on Debian Squeeze with PHP 5.3.27. I have the following
pool configuration:

[bmde_prod]
listen = /var/lib/php5-sockets/bmde_prod.socket

pm = dynamic
pm.max_children = 250
pm.start_servers = 15
pm.min_spare_servers = 14
pm.max_spare_servers = 15
pm.max_requests = 1000

listen.backlog = -1

In normal operation, I have 16-20 pool processes running. From time to
time, the pool rises from 16-20 pool processes to maximum of 250 processes.
But there is no traffic from outside, after the limit of 250 is reached the
whole pool gets unavailable.


When I start a strace -n 3000 -f to all (250) running pool processes, I get
the following output:


[pid 20173] <... poll resumed> ) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19919] <... poll resumed> ) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20186] <... poll resumed> ) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19973] <... poll resumed> ) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20090] <... poll resumed> ) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20548] <... poll resumed> ) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20131] <... poll resumed> ) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19915] <... poll resumed> ) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19981] <... poll resumed> ) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20364] <... poll resumed> ) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20297] <... poll resumed> ) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19850] <... poll resumed> ) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20395] <... poll resumed> ) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20523] <... poll resumed> ) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20422] <... poll resumed> ) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20495] <... poll resumed> ) = 0 (Timeout)
[pid 20363] <... poll resumed> ) = 0 (Timeout)

.... and a lot more of the same lines.


If I kill one or two processes of the pool, the pool itself gets available
again and lowers the pool processes to normal operation.

Does anybody know that's about that?

Thanks,
Jonas

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Przemysław Pawliczuk
RE: pool get unavailable
April 08, 2014 04:08PM
Do you have compiled PHP yourself or are you using packaged? Try upgrading to 5.5, many things were changed with resources usage.



From: highload-php-en@googlegroups.com [mailto:highload-php-en@googlegroups.com] On Behalf Of Jonas Genannt
Sent: Tuesday, March 11, 2014 10:36 AM
To: highload-php-en
Subject: pool get unavailable



Hello,

I'm using PHP FPM on Debian Squeeze with PHP 5.3.27. I have the following pool configuration:

[bmde_prod]
listen = /var/lib/php5-sockets/bmde_prod.socket

pm = dynamic
pm.max_children = 250
pm.start_servers = 15
pm.min_spare_servers = 14
pm.max_spare_servers = 15
pm.max_requests = 1000

listen.backlog = -1

In normal operation, I have 16-20 pool processes running. From time to time, the pool rises from 16-20 pool processes to maximum of 250 processes.
But there is no traffic from outside, after the limit of 250 is reached the whole pool gets unavailable.


When I start a strace -n 3000 -f to all (250) running pool processes, I get the following output:


[pid 20173] <... poll resumed> ) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20173] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19919] <... poll resumed> ) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19919] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20186] <... poll resumed> ) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20186] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19973] <... poll resumed> ) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19973] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20090] <... poll resumed> ) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20090] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20548] <... poll resumed> ) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20548] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20131] <... poll resumed> ) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20131] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19915] <... poll resumed> ) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19915] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19981] <... poll resumed> ) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19981] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20364] <... poll resumed> ) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20364] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20297] <... poll resumed> ) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20297] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19850] <... poll resumed> ) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 19850] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20395] <... poll resumed> ) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20395] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20523] <... poll resumed> ) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20523] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20422] <... poll resumed> ) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid 20422] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 0 <unfinished ...>
[pid 20016] <... poll resumed> ) = 0 (Timeout)
[pid 19774] <... poll resumed> ) = 0 (Timeout)
[pid 20016] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 19774] poll([{fd=9, events=POLLIN|POLLPRI}], 1, 1000 <unfinished ...>
[pid 20495] <... poll resumed> ) = 0 (Timeout)
[pid 20363] <... poll resumed> ) = 0 (Timeout)

.... and a lot more of the same lines.


If I kill one or two processes of the pool, the pool itself gets available again and lowers the pool processes to normal operation.

Does anybody know that's about that?

Thanks,
Jonas



--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready