Von: Luca Toscano [mailto:toscano.l...@gmail.com]
Gesendet: Samstag, 8. Juli 2017 09:52
An: Apache HTTP Server Development List <email@example.com>
Betreff: Re: mod_proxy_fcgi and flush
Hi Jacob, Helmut!
2017-07-06 20:54 GMT+02:00 Jacob Champion
On 07/06/2017 11:13 AM, Jim Jagielski wrote:
works 4 me...
Doesn't for me. E.g. with a script like
it takes 1 second to receive a single chunk with both lines in it.
From a quick skim I assume this is because we don't use nonblocking sockets in
the proxy implementation. (There's even a note in mod_proxy_fcgi that says,
"Yes it sucks to [get the actual data] in a second recv call, this will
eventually change when we move to real nonblocking recv calls.")
Quick check from my side too, so not sure if it makes sense. IIUC the comment
is about getting all the headers from the FCGI backend (get_data_full(...,
AP_FCGI_HEADER_LEN)), then get the response body in another one (the [actual
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).
Caveat: I had to set output_buffering = Off in my php-fpm's php.ini config file.
Flushing unconditionally is a bad idea performance wise. Please have a look how
ajp solved this issue:
Hint: The above diff contains further unrelated changes.