[PR][php-src][#710][PHP-5.5.14] - * double fastcgi_end_request on max_children limit
| From: | noreply@php.net | Date: | Sun, 08 Mar 2015 15:27:33 +0000 |
| Subject: | [PR][php-src][#710][PHP-5.5.14] - * double fastcgi_end_request on max_children limit | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2643@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/710
Pull Request 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;
}
`
It confuses fastcgi client (i.e. nginx) receiving 2 FCGI_END_REQUEST records one after another.
So I have set request->closed flag to prevent second FastCGI record sending.