php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68423 PHP-FPM will no longer load all pools
Submitted: 2014-11-14 13:57 UTC Modified: 2014-11-16 07:14 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: leo dot feyer at gmail dot com Assigned: remi (profile)
Status: Closed Package: FPM related
PHP Version: 5.5.19 OS: irrevelant
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: leo dot feyer at gmail dot com
New email:
PHP Version: OS:

 

 [2014-11-14 13:57 UTC] leo dot feyer at gmail dot com
Description:
------------
The PHP-FPM changes in version 5.5.19 and 5.6.3 seem to break PHP-FPM when using the network stack. It can be reproduced e.g. on Ubuntu 14.04 by creating 5 different pools (port numbers 9001 to 9005) and then starting the PHP-FPM service. I would expect to have a listener on each of the five ports, instead only the first pool is actually loaded. The others fail to load (can e.g. be checked with netstat -tlpn | sort).

I had to downgrade to version 5.5.18/5.6.2 to fix the issue.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-11-14 14:35 UTC] tyrael@php.net
hi, are you sure this isn't a duplicate of https://bugs.php.net/bug.php?id=68420 ?
what is your listen configured to?
 [2014-11-14 14:43 UTC] leo dot feyer at gmail dot com
listen = 127.0.0.1:9001

I am pretty sure this is not a duplicate of 68420, also because their workaround (listen = :::9001) does not solve our problem.
 [2014-11-14 16:34 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2014-11-14 18:16 UTC] remi@php.net
-Operating System: Ubuntu 14.04 +Operating System: irrevelant
 [2014-11-14 19:02 UTC] leo dot feyer at gmail dot com
No, unfortunately the patch does not make any difference. I have tried it with both 127.0.0.1:<port> and :::<port> as mentioned in https://bugs.php.net/bug.php?id=68420 .
 [2014-11-14 19:12 UTC] remi@php.net
Do you have any message in the error_log ?

When I reproduce this issue, I got (because same socket used for all pools):
[14-Nov-2014 17:06:53] ERROR: epoll: unable to add fd 11
 [2014-11-14 19:18 UTC] leo dot feyer at gmail dot com
Yes, I got a lot of [ERROR] epoll: unable to add fd 8 and also some [ERROR] epoll: unable to add fd 7.
 [2014-11-15 06:06 UTC] remi@php.net
Report about the same (?) issue and test for the fix
http://forums.famillecollet.com/viewtopic.php?id=2944
 [2014-11-15 19:08 UTC] leo dot feyer at gmail dot com
Your patch at http://git.php.net/?p=php-src.git;a=commitdiff;h=1d9bb287c566425a9ab4b8de62940565fe357270 does fix the issue that listen=9000 was listening on IPv6 by default. It is now listening on IPv4 again.

However, it does not fix the initial problem described in this bug report, being that not all of the five pools are loaded.

Here's the netstat output (pools 9002, 9003 and 9005 are missing):

tcp  0  0  127.0.0.1:9001  0.0.0.0:*  LISTEN  0  976333  6761/php-fpm.conf)
tcp  0  0  127.0.0.1:9004  0.0.0.0:*  LISTEN  0  976334  6761/php-fpm.conf)

Here are the relevant log entries:

Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [DEBUG] fpm_scoreboard_init_main(), line 40: got clock tick '100'
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [DEBUG] fpm_event_init_main(), line 337: event module is epoll and 1 fds have been reserved
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [NOTICE] fpm_init(), line 83: fpm is running, pid 6761
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [DEBUG] main(), line 1856: Sending "1" (OK) to parent via fd=5
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [ERROR] fpm_event_epoll_add(), line 177: epoll: unable to add fd 9
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: message repeated 2 times: [ [ERROR] fpm_event_epoll_add(), line 177: epoll: unable to add fd 9]
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [DEBUG] fpm_pctl_heartbeat(), line 460: heartbeat have been set up with a timeout of 10000ms
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [DEBUG] fpm_event_loop(), line 366: 118160 bytes have been reserved in SHM
Nov 15 20:04:23 w3 php-fpm-5.5.19[6761]: [NOTICE] fpm_event_loop(), line 367: ready to handle connections
 [2014-11-15 20:19 UTC] leo dot feyer at gmail dot com
I'm sorry, I forgot to apply your second patch. After applying all three (68420, 68421 and 68423), it now works like a charm. Thank you for your quick reaction.
 [2014-11-16 07:14 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2014-11-16 07:14 UTC] remi@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Thanks for test / confirmation of the various fix.
 [2014-11-18 20:34 UTC] ab@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=23db11976889c3600cf7853fe0fd687a1c9435e6
Log: Fix bug #68423i PHP-FPM will no longer load all pools
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC