- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Hi
I am having issues with PHP notices after upgrading from php 5.4.26 to 5.4.28. I original thought it was a php issue but it may be related to this Redis extension.
The full details can be found here http://stackoverflow.com/questions/23713480/after-php-upgrade-pcntl-fork-causing-errno-32-broken-pipe
But basically when I am forking, whenever a child closes, except for the first child, I get an error saying:
Notice: Unknown: send of 6 bytes failed with errno=32 Broken pipe in Unknown on line 0
It feels like the first child is closing the connection to Redis and then the following children try and close the same connection.
It appears that this has only just started being an issue since either PHP 5.4.27 or 5.4.28
Could this be a phpredis issue?
I have Redis Version => 2.2.5 installed
nicolashohm
Activity
michael-grunder commentedon May 19, 2014
Hey there,
While I don't know specifically why, I have a strong suspicion that the Zend library might get a little quirky around sockets within the context of a forking. That being said, I'll see if I can replicate your issue based on the stack overflow question you mentioned.
Cheers dude,
Mike
penfold45 commentedon May 19, 2014
Brilliant thanks. For the time being I have just disabled php notice errors for the scripts that fork. Makes my log files a little quieter ;)
penfold45 commentedon Jun 5, 2014
Hi. I was woundering if you have had chance to look into this yet?
penfold45 commentedon Sep 30, 2014
Bump*
jessem commentedon Oct 29, 2014
+1 Also seeing this issue with workers that fork in PHPResque https://github.com/chrisboulton/php-resque
splitice commentedon Nov 16, 2014
+1 also seeing this in php resque workers.
Appears harmless... guessing its "QUIT\r\n"
Disable phpredis
jat001 commentedon Jan 12, 2015
I know how to fix this bug. Just close the connect to redis before pcntl_fork and re-connect to redis after pcntl_fork.
anton000 commentedon Jan 21, 2015
no updates?
roeyb commentedon Feb 3, 2015
+1
kaminono commentedon Feb 11, 2015
+1
rlweb commentedon Feb 20, 2015
+1
schlaus commentedon Mar 20, 2015
+1
lexaurin commentedon Mar 26, 2015
Same here. PHP 5.5.9, phpredis 2.2.7
Simple script to replicate this bug https://gist.github.com/lexaurin/8897f1be48b9e8747b7d/e8a5fcd750623b6fc250f9c529fc2e65cc55893a
Expected result:
Actual result:
Connections before script (
lsof -i :6379
):Connections after first child forked:
Connections after second child forked:
Connections after third child forked:
Note: Fact that child closes "both" connections at the end is right (since it shares file descriptor with parent).
lexaurin commentedon Mar 26, 2015
Modified my gist a bit to see which process produces notice https://gist.github.com/lexaurin/8897f1be48b9e8747b7d/d46ccd5c2ffabb1c3a09118db80654cb382c6c96
and it's interesting - third child at the end and following children and then parent at the end.
My log:
31 remaining items