|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2014-07-07 11:18 UTC] saprykin dot dmitry at gmail dot com
-PHP Version: Irrelevant
+PHP Version: 5.5.14
[2014-07-07 11:18 UTC] saprykin dot dmitry at gmail dot com
[2015-02-04 16:36 UTC] sdgf at example dot com
[2015-02-05 05:17 UTC] saprykin dot dmitry at gmail dot com
[2015-03-10 09:42 UTC] reallfqq-php at yahoo dot fr
[2017-01-07 21:54 UTC] nikic@php.net
[2017-01-07 21:54 UTC] nikic@php.net
-Status: Open
+Status: Closed
[2018-02-15 16:05 UTC] ablagoev at xs-software dot com
[2018-02-15 16:16 UTC] nikic@php.net
-Assigned To:
+Assigned To: nikic
[2018-02-15 16:16 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 20:00:01 2025 UTC |
Description: ------------ Php sends 2 fastcgi FCGI_END_REQUEST records instead of one when fastcgi_finish_request(); called and fpm param max_requests exceeded. * one is sent on fastcgi_finish_request(); call * other is sent in block fpm_main.c:1951 requests++; if (max_requests && (requests == max_requests)) { fcgi_finish_request(&request, 1); break; } I have created pull request for this bug https://github.com/php/php-src/pull/709 It confuses fastcgi client (i.e. nginx) receiving 2 FCGI_END_REQUEST records one after another. Test script: --------------- <?php ignore_user_abort(); fastcgi_finish_request(); sleep(10); ?> Nginx configuration upstream fpm { server 127.0.0.1:9000; keepalive 1; } server { ...... fastcgi_keep_conn on; fastcgi_param SCRIPT_NAME /index.php; fastcgi_pass fpm; ...... } PHP FPM configuration max_children = 1 max_requests = 2 Expected result: ---------------- No errors in nginx error log Actual result: -------------- Every second request is finished with 502 status Nginx error.log contains records: 2014/07/07 13:42:58 [error] 11253#0: *1 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /nginx_test.phtml HTTP/1.1", upstream: "fastcgi://127.0.0.1:8002", host: "localhost:8081"