Bug #69890 [Com]: pm.ondemand does not kill children after reaching max limit
| From: | c dot kras at pcc-online dot net | Date: | Tue, 03 May 2016 12:23:28 +0000 |
| Subject: | Bug #69890 [Com]: pm.ondemand does not kill children after reaching max limit | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200870@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69890&edit=1
ID: 69890
Comment by: c dot kras at pcc-online dot net
Reported by: vadimyer at gmail dot com
Summary: pm.ondemand does not kill children after reaching
max limit
Status: Open
Type: Bug
Package: FPM related
Operating System: Debian 8.1 x64
PHP Version: 7.0.0alpha1
Block user comment: N
Private report: N
New Comment:
Happens on Ubuntu 16.04 as well, both with PHP 7.0.4 provided by Ubuntu and a self compiled PHP
7.0.6. With the self compiled version I did see some children getting killed of after a long while.
According to the debug output after ~326 seconds from start, even though I had set
process_idle_timeout to 4. My only change to the example pool config was changing
process_idle_timeout and pm=ondemand.
Here's a part of the debug output:
[03-May-2016 14:13:25.104184] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 5 active children, 0 spare children
[03-May-2016 14:13:26.106198] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 5 active children, 0 spare children
[03-May-2016 14:13:27.108238] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 2 spare children
[03-May-2016 14:13:28.109372] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 2 spare children
[03-May-2016 14:13:29.110266] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 2 spare children
[03-May-2016 14:13:30.111446] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 2 spare children
[03-May-2016 14:13:31.112601] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 2 spare children
[03-May-2016 14:13:31.119000] DEBUG: pid 6788, fpm_got_signal(), line 76: received SIGCHLD
[03-May-2016 14:13:31.119052] DEBUG: pid 6788, fpm_children_bury(), line 254: [pool watergid] child
6790 has been killed by the process management after 326.681484 seconds from start
[03-May-2016 14:13:31.119065] DEBUG: pid 6788, fpm_event_loop(), line 419: event module triggered 1
events
[03-May-2016 14:13:32.114155] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 1 spare children
[03-May-2016 14:13:32.122412] DEBUG: pid 6788, fpm_got_signal(), line 76: received SIGCHLD
[03-May-2016 14:13:32.122486] DEBUG: pid 6788, fpm_children_bury(), line 254: [pool watergid] child
6791 has been killed by the process management after 327.465150 seconds from start
[03-May-2016 14:13:32.122504] DEBUG: pid 6788, fpm_event_loop(), line 419: event module triggered 1
events
[03-May-2016 14:13:33.115569] DEBUG: pid 6788, fpm_pctl_perform_idle_server_maintenance(), line 362:
[pool watergid] currently 3 active children, 0 spare children
This last message kept getting repeated.
So in addition to the original bug report, even if the spawn limit hasn't been reached the
children should still be killed after pm.process_idle_timeout, but they don't.
Previous Comments:
------------------------------------------------------------------------
[2016-02-22 19:15:34] lofesa at gmail dot com
Same issue. Centos 7. php 7.0.3. Children processes are not killed. Master process are doing nothing
unless send messages to systemd like this
sendmsg(21, {msg_name(21)={sa_family=AF_LOCAL, sun_path="/run/systemd/notify"},
msg_iov(1)=[{"READY=1\nSTATUS=Processes active:"..., 84}], msg_controllen=0, msg_flags=0},
MSG_NOSIGNAL) = 84
close(21)
------------------------------------------------------------------------
[2015-08-19 05:34:50] satanistlav at mail dot ru
It seems to be only Debian 8 bug.
No such bug on Debian 7 or Ubuntu 12
------------------------------------------------------------------------
[2015-06-20 13:39:22] vadimyer at gmail dot com
Description:
------------
Looks like php7-fpm doesn't kill its children while in ondemand mode.
Test script:
---------------
Probably test "script" in this case is www.conf config:
user = www-data
group = www-data
listen = 127.0.0.1:9007
pm = ondemand
pm.max_children = 100
pm.process_idle_timeout = 10s
Expected result:
----------------
After spawning 100 children processes the system should start killing those processes if no longer
needed, depending on the pm.process_idle_timeout setting.
Actual result:
--------------
After spawning 100 children processes all children still exist and aren't going to be killed.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69890&edit=1