httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helmut K. C. Tessarek" <>
Subject Re: mod_proxy_fcgi and flush
Date Sun, 09 Jul 2017 00:22:19 GMT
Hi Luca,

Thanks for looking into this.

On 2017-07-08 03:51, Luca Toscano wrote:
> I checked mod_fcgi as Helmut suggested and it seems to me that the
> -flush feature is a simple "flush every data that you receive", so I
> tested the following patch with Jacob's php example code and it seems
> doing what Helmut asked (please correct me if I am wrong).

No, you are correct. But I was merely referring to the comment on the
documentation page.
But yes, this seems to mirror the "-flush" option that is present for

> Caveat: I had to set output_buffering = Off in my php-fpm's php.ini
> config file.

This should be ok, since people who are using output buffering are
usually aware that it can influence the app's behaviour. I think that
was even stated in the PHP manual somewhere.
Although I also remember that there was a section that states that both
ob_flush() and flush() have to be called to make flush work with output
buffering on.

> So if what I wrote vaguely makes sense, we might think about adding a
> new directive that enables explicit flushing to mod_proxy_fcgi, so
> admins can twist its behavior if needed?

As far as I can tell it makes sense, but I haven't gone through the
entire proxy code yet.

Are you thinking of a directive like ProxyFCGIFlush or an option to the
proxy worker:

<Proxy "fcgi://localhost/" flush=yes>

> Completely agree with Jacob, this use case might not be the best one for
> HTTP :)

As mentioned before, in a perfect world I'd agree. But this option was
available with FastCgiExternalServer, thus it should be available with
proxy_fcgi as well, especially when proxy_fcgi is the preferred way for
Apache >= 2.4.

 K. C.

regards Helmut K. C. Tessarek
lookup for KeyID 0xC11F128D

   Thou shalt not follow the NULL pointer for chaos and madness
   await thee at its end.

View raw message