All files from this thread

File Name File Size   Posted by Date  
nginx.conf 2.7 KB open | download B.R. 10/07/2013 Read message
test.php 77 bytes open | download B.R. 10/07/2013 Read message
php.ini 67.3 KB open | download B.R. 10/07/2013 Read message
nginx_php_backend.pcapng 5.5 KB open | download B.R. 10/07/2013 Read message
Maxim Dounin
October 08, 2013 11:50AM
Hello!

On Mon, Oct 07, 2013 at 10:57:14PM -0400, B.R. wrote:

[...]

> I then noticed on the capture that PHP was rightfully sending the content
> in 2 parts as expected but somehow nginx was still waiting for the last
> parto to arrive before sending content to the client.

What makes you think that nginx was waiting for the last part
without sending data to the client?

Please note that checking by a browser as in your check list isn't
something meaningful as browsers may (and likely will) wait for a
complete response from a server. In my limited testing on
Windows, IE needs a complete response, while Chrome shows data on
arrival.

Just in case, it works fine here with the following minimal
config:

events {}
http {
server {
listen 8080;
location / {
fastcgi_pass backend:9000;
fastcgi_param SCRIPT_FILENAME /path/to/flush.php;
fastcgi_keep_conn on;
}
}
}

But, again, testing with fastcgi_keep_conn is mostly useless now,
it's an abuse of the unrelated directive. The fastcgi_buffering
directive is already here in 1.5.6, use

fastcgi_buffering off;

instead if you need to turn off buffering for fastcgi responses.
Just in case, documentation can be found here:

http://nginx.org/r/fastcgi_buffering

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to disable output buffering with PHP and nginx

Ben Johnson September 16, 2013 01:22PM

Re: How to disable output buffering with PHP and nginx

Ben Johnson October 07, 2013 03:24PM

Re: How to disable output buffering with PHP and nginx

itpp2012 October 07, 2013 04:25PM

Re: How to disable output buffering with PHP and nginx

Francis Daly October 07, 2013 05:36PM

Re: How to disable output buffering with PHP and nginx

B.R. October 07, 2013 06:00PM

Re: How to disable output buffering with PHP and nginx

Maxim Dounin October 07, 2013 07:20PM

Re: How to disable output buffering with PHP and nginx Attachments

B.R. October 07, 2013 11:00PM

Re: How to disable output buffering with PHP and nginx

Maxim Dounin October 08, 2013 11:50AM

Re: How to disable output buffering with PHP and nginx

Ben Johnson October 10, 2013 11:14AM

Re: How to disable output buffering with PHP and nginx

Maxim Dounin October 10, 2013 11:28AM

Re: How to disable output buffering with PHP and nginx

Ben Johnson October 10, 2013 12:50PM

Re: How to disable output buffering with PHP and nginx

itpp2012 October 10, 2013 01:35PM

Re: How to disable output buffering with PHP and nginx

Maxim Dounin October 10, 2013 02:26PM

Re: How to disable output buffering with PHP and nginx

Ben Johnson October 12, 2013 04:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready