Welcome! Log In Create A New Profile

Advanced

Re: SOS! Why Nginx DID NOT flush buffer to client?

Tobia Conforto
February 11, 2010 04:22AM
21andy wrote:
> I want to the php file output 1 line per second.

I know it's not an answer to your question, but you should re-evaluate your application architecture. If you need progress report on lengthy operations you can use separate batch processes, messaging queues, databases, Ajax, and all sorts of tools.

The reason nginx buffers all output is because, most of the times, generating the response is a much faster operation than transferring it to the client. Therefore, by buffering it, nginx frees the backend worker (the php child process) sooner and the system is able to serve more requests per unit of time, for a given amount of ram. Which is one of the main aims of server optimization.

Hope this explains the logic behind it.

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

SOS! Why Nginx DID NOT flush buffer to client?

21andy February 09, 2010 03:29AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Georgi Hristozov February 09, 2010 11:10AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Rob Schultz February 09, 2010 11:56AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Tobia Conforto February 11, 2010 04:22AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Daniel Hahler February 15, 2010 05:44AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Rob Schultz February 15, 2010 12:42PM

Re: SOS! Why Nginx DID NOT flush buffer to client?

winux May 16, 2012 02:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
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