fastcgi_read_timeout with PHP backend

Maxim Dounin mdounin at mdounin.ru
Wed Jun 5 13:48:36 UTC 2013


Hello!

On Wed, Jun 05, 2013 at 08:50:49AM -0400, B.R. wrote:

> Hello,
> 
> Non-broken tcpdump just confirms what was already said based on
> 
> > error log: nothing is seen from php after 18:48:45, and
> > this results in the timeout at 18:50:45.  You have to dig into
> > your code.
> >
> >
> ​I agree.
> 
> However, if you look at the output, you'll notice that the output is cut in
> the middle of what is sent at 16:45:43.8 UTC.
> The content of the array as printed by PHP in the TCP socket contains 29
> elements (numbered from 0 to 28). The output is cut at the 24th.
> 
> All the following content sent by PHP (and... received by Nginx?) are not
> displayed which produces the faulty browser output.
> 
> I understand there is a timeout at some point (PHP runs out of memory). It
> seems that the error is not sent through the FastCGI tunnel and PHP simply
> stops answering.
> But that is another problem, not the main one I wanna outline here.​

As long as upstream server times out, nginx stops processing of 
the request without sending what was buffered by nginx but not yet 
sent to a client.

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



More information about the nginx mailing list