Bug #77574 [Com]: FPM failes to responed to apache2

From: Date: Wed, 06 Feb 2019 11:09:59 +0000
Subject: Bug #77574 [Com]: FPM failes to responed to apache2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219389@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77574&edit=1 ID: 77574 Comment by: martin dot barker at thissibeacon dot com Reported by: martin dot barker at thisisbeacon dot com Summary: FPM failes to responed to apache2 Status: Not a bug Type: Bug Package: FPM related Operating System: Ubuntu 16.04.4 LTS PHP Version: 7.2.14 Block user comment: N Private report: N New Comment: So just to be clear 2 members of staff at our side 2 AWS Engineering staff all looking into this problem for 4 hours. We had tcpdump running, a static apache (HTML) site was working the whole time. so this was only happening when php was being used. how we identified this was from the tcpdump we could see everything from the load balancer to the server was working. We could even see the server was sending the output content from PHP-FPM as it was created. The only problem was that the PHP-FPM handle waited for the socket timeout to occur Default of 60 seconds even though it has finished execution of the files. However, when the WordPress does not have a DB error it does not do the same site loads and responded in under 2 seconds. So unless you're telling me that there is a bug in the Most Used PHP Application in the world in a specific case it errored created the output then but the process to sleep for more than 60 seconds before closing the connection. This is a PHP Bug, Apache2 works without PHP no Problem Apache2 is using the PHP Connector in FPM Mode. every part of where this error could be coming from is PHP Projects Code. Previous Comments: ------------------------------------------------------------------------ [2019-02-06 10:54:39] martin dot barker at thisisbeacon dot com Wait your telling me a PHP Application not responding correctly is not a bug... So what your deliberately leave the connection to apache2 open when it a handled error happens, even though no error it closes the connection correctly? ------------------------------------------------------------------------ [2019-02-06 02:30:14] requinix@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Besides the fact that the problem clearly appears to be with the LB, this is too complicated to deal with on a bug tracker. Too many variables. If you can eventually track down the problem to something specifically with php-fpm (which has no knowledge of your LB because Apache is in between) then we can work from there. ------------------------------------------------------------------------ [2019-02-06 02:13:00] martin dot barker at thisisbeacon dot com Description: ------------ This is a pain to replicate but spent 2 hours with AWS engineers (plural) working this one out. Load Balancer to Apache2 to PHP7.2-FPM Wordpress 5 - Database Connection error (Firewall / security group blocking access to Database) PHP builds response and output and works correctly if you we used curl to the server curl with the "host:" header we could see the full HTML response generated by Wordpress. When going via a Load Balance on AWS (Application Load Balancer) the underlying apache connection to the server was never closed so the load balancer just keep waiting for the connection to close before time out. Test script: --------------- Wordpress 5 Expected result: ---------------- When Wordpress handle the DB connection error and produces a complete error output it should close the connection to apache. Actual result: -------------- Seems to hang and leave the connection open meaning apache does not close it's connection correctly ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77574&edit=1

« previous php.bugs (#219389) next »