Conversation
That can be the case, yes. Current implementation of php-fpm uses this hook just to zero variables, so it's not a problem. But if you think this should fire only once I can dig into it...
Again, since it's just resetting variables it doesn't matter as far as I understand. But I don't know what the author of that code really wanted for this hook. |
|
@dyeldandi You're right that fpm_request_reading_headers() doesn't seem to do anything particularly critical, so doing two calls won't break things too badly. However it will probably mess with the statistics, as these increments will be done twice. |
|
@nikic |
| if (UNEXPECTED(max_requests && (requests == max_requests))) { | ||
| fcgi_finish_request(request, 1); | ||
| fcgi_request_set_keep(request, 0); | ||
| fcgi_finish_request(request, 0); |
There was a problem hiding this comment.
This looks reasonable. Should the same change also be done here?
There was a problem hiding this comment.
Well, yeah, looks like. Although I don't use CGI SAPI and never looked into that code, so I can't really say.
Yeah, it is being called twice when a new connection arrives, which does mess up the statistics. |
|
Merged via 9814be4, thanks! |
Retargeting PR #2375