Bug #73056 [NEW]: PHP FPM child processes keep exit and start very very quickly (continuously)

From: Date: Fri, 09 Sep 2016 11:26:06 +0000
Subject: Bug #73056 [NEW]: PHP FPM child processes keep exit and start very very quickly (continuously)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203908@lists.php.net to get a copy of this message
From:             samer dot mhana at gmail dot com
Operating system: Ubuntu 16.04.1 LTS
PHP version:      7.0.10
Package:          FPM related
Bug Type:         Bug
Bug description:PHP FPM child processes keep exit and start very very quickly (continuously)

Description:
------------
Dear sirs

I have installed php 7.0.10 on my Ubuntu server. PHP run in FPM mode
with nginx. PHP does not have user load (only me) since I am working
privately on new project

PHP configuration is minimal. some standard extensions along with pecl
xdebug, redis and maxmind.

The weird problem that happens: PHP child processes keeping exit and
restart continuously without stop. Here are some of the lines of my FPM
log (Debug):

*********************************************************************
[09-Sep-2016 12:51:00.158151] NOTICE: pid 15821, fpm_children_make(),
line 421: [pool php7-admin] child 1156 started
[09-Sep-2016 12:51:00.158164] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 1 events
[09-Sep-2016 12:51:00.161542] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 2 events
[09-Sep-2016 12:51:00.161571] DEBUG: pid 15821, fpm_got_signal(), line
76: received SIGCHLD
[09-Sep-2016 12:51:00.161585] NOTICE: pid 15821, fpm_children_bury(),
line 252: [pool php7-admin] child 1154 exited with code 0 after 0.011634
seconds from start
[09-Sep-2016 12:51:00.162047] NOTICE: pid 15821, fpm_children_make(),
line 421: [pool php7-admin] child 1157 started
[09-Sep-2016 12:51:00.162065] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 1 events
[09-Sep-2016 12:51:00.165706] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 2 events
[09-Sep-2016 12:51:00.165733] DEBUG: pid 15821, fpm_got_signal(), line
76: received SIGCHLD
[09-Sep-2016 12:51:00.165748] NOTICE: pid 15821, fpm_children_bury(),
line 252: [pool php7-admin] child 1155 exited with code 0 after 0.011767
seconds from start
[09-Sep-2016 12:51:00.166188] NOTICE: pid 15821, fpm_children_make(),
line 421: [pool php7-admin] child 1158 started
[09-Sep-2016 12:51:00.166201] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 1 events
[09-Sep-2016 12:51:00.169747] DEBUG: pid 15821, fpm_event_loop(), line
419: event module triggered 2 events
[09-Sep-2016 12:51:00.169773] DEBUG: pid 15821, fpm_got_signal(), line
76: received SIGCHLD
[09-Sep-2016 12:51:00.169786] NOTICE: pid 15821, fpm_children_bury(),
line 252: [pool php7-admin] child 1156 exited with code 0 after 0.011643
seconds from start
*************************************************

There are millions of line in that log files that are created in just
few hours. 

After I restart PHP Master process,  everything return normal for few
hours. After that I find high CPU load for the master process, and check
the log to find this outcome.

I tried to unload extensions, changing "pm" to static and back to
ondemand. But always the same result (PHP FPM goes crazy after few
hours).

Here is my PHP-FPM conf

[global]
emergency_restart_threshold = 100
emergency_restart_interval = 1d
error_log = log/php-fpm-admin.log
log_level = debug

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;

[php7-admin]
user = myuser
group = myuser
listen = /home/myuser/php7-admin.sock
listen.owner = myuser
listen.group = nogroup
listen.mode = 0660
listen.backlog=2000
pm = static
pm.max_children = 3
pm.process_idle_timeout = 10
pm.max_requests = 2000
security.limit_extensions = .php
catch_workers_output = yes


I really need to resolve this issue before I move on in my project. I
searched the whole bug system and internet if anything can help with no
luck. I only found (somehow similar) bug
https://bugs.php.net/bug.php?id=70185




Test script:
---------------
No test script. it Just happens without executing specific script.

Expected result:
----------------
Expected that PHP-FPM only kill child processes after reaching
pm.process_idle_timeout > 10 seconds OR pm.max_requests > 2000 in
"ondemand" or only after reaching the pm.max_requests in static mode.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=73056&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=73056&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=73056&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=73056&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=73056&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=73056&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=73056&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=73056&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=73056&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=73056&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=73056&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=73056&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=73056&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=73056&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73056&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=73056&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=73056&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=73056&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73056&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=73056&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=73056&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#203908) next »