Mailing List Archive

Nginx FastCGI Timeout (even after increasing Nginx timeouts)
Hi,

I feel like I've exhausted Google/IRC/StackOverflow in trying to figure
this issue out.

I have a Catalyst app, using FastCGI, behind Nginx, on CentOS.

I've created a dummy request that sleeps for 2 minutes.

With a default installation, Nginx responds after 60s with a 504
timeout, and an entry in the error log.  All as expected.

However, increasing both *fastcgi_send_timeout* and
*fastcgi_read_timeout* to 10 minutes, still results in a 504, *but a
slightly different version*.

Nothing goes in the Nginx error log.

See http://web.lavoco.com/504-fastcgi-timeouts.png

It would appear something other than Nginx is timing out, yet there are
no timeout values to configure with all of the Perl modules used for
FastCGI (that I can see).

Hopefully someone has come across this before, or can help point me in
the right direction to debug this further.

Thanks,

Rob
Re: Nginx FastCGI Timeout (even after increasing Nginx timeouts) [ In reply to ]
Hi Robert

> See http://web.lavoco.com/504-fastcgi-timeouts.png
>
> It would appear something other than Nginx is timing out, yet there
> are no timeout values to configure with all of the Perl modules used
> for FastCGI (that I can see).
>

ISTM that the first timeout is Nginx waiting for the backend to
complete. The second is the backend (the fastcgi server) killing the
process because it thinks it's hanging. I'm not aware which server
Catalyst uses as default for fastcgi these days, or if you deploy on
e.g. Plack. But you should probably look for a heatbeat_timeout or
something like that.

/kaare


_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/