On Mon, Jul 24, 2017 at 7:29 PM, Jacob Champion <champio...@gmail.com> wrote: > > I was able to reproduce a hang with PHP-FPM and enablereuse=on, but I > don't think it's UDS-specific. (Haven't tried with TCP yet, though.) > > If the maximum number of connections opened by httpd to PHP-FPM exceeds > the maximum number of requests that FPM is configured to handle in > parallel, the extra connections will be queued up for later. But since > we're no longer closing connections once a request finishes, those > queued connections will hang until we hit the ProxyTimeout.
Hmm, don't we close the backend connection (i.e. conn->close = 1) whenever an error occurs in the fgci loop? What do you mean by "queue up for later", by whom? Where do that coonection go on the httpd side? A first look it seems we do close on error, which should take care of not reusing a backend connection is an undefined state. At reuse time (next request), we also check for connection reusability with a nonblocking read, otherwise we open a new one. Admittedly it won't address the timeout case of the previous request (which can't/shouldn't be handled here anyway), but if the connection was closed remotely in the meantime it would be detected, unless the connection is really aside nowhere on the backend side... Regards, Yann.