Bug #69777 [NEW]: 502 Bad Gateway when getting response
| From: | sb at firstvector dot org | Date: | Mon, 08 Jun 2015 21:03:58 +0000 |
| Subject: | Bug #69777 [NEW]: 502 Bad Gateway when getting response | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-193221@lists.php.net to get a copy of this message | ||
From: sb at firstvector dot org
Operating system: OS X Yosemite 10.10.3 (14D136)
PHP version: 5.6.9
Package: FPM related
Bug Type: Bug
Bug description:502 Bad Gateway when getting response
Description:
------------
Using PHP-FPM 5.6.9 I've getting the error while working with cURL, for
example. When I commented the code that does remote requests then
everything's fine, otherwise error log contains an errors like:
upstream prematurely closed connection while reading response header
from upstream, client: 127.0.0.1, server: unga.loc, request: "GET /
HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "unga.loc",
referrer: "http://unga.loc/content/test-project-4"
For solving this problem I've tried to use UNIX socket and TCP
connection - no result. So, I've think that is an error.
Used software:
nginx 1.8.0 (also tested on 1.6.3)
php-fpm 5.6.9 (works fine on 5.6.7)
Test script:
---------------
// Execution of this (and similar) code will ends by 502 error.
$ch = curl_init('https://php.net');
curl_setopt_array($ch, [
CURLOPT_HTTPGET => true,
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
--
Edit bug report at https://bugs.php.net/bug.php?id=69777&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69777&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69777&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69777&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69777&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69777&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69777&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69777&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69777&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69777&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69777&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69777&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69777&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69777&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69777&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69777&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69777&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69777&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69777&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69777&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69777&r=mysqlcfg