1

I'm running a django app with mod_wsgi and proxying with nginx. One of my views takes 2+ minutes to complete. When I visit it, I get a 504 gateway timeout. Is there a setting I can change to increase the time it takes to timeout? I've tried proxy_connect_timeout, proxy_read_timeout, and proxy_send_timeout in nginx without any luck.

Thanks.

Kevin
  • 113
  • 1
  • 6
  • Well it should, can you show how did you configure your timeouts/server? – coredump May 07 '11 at 03:12
  • Don't forget about other proxies that might be in front of your app, like AWS CloudFront or Heroku routers, which may also have a configurable timeout duration. – David Winiecki Dec 19 '22 at 18:08

2 Answers2

1

Have you checked this directive out?

uwsgi_connect_timeout

Source: http://wiki.nginx.org/HttpUwsgiModule

It might not work since you have Apache as an intermediary between Nginx and your WSGI Application. You may be able to, like Sameer mentioned, increase the normal proxy timeout in Nginx and also find the equivelant configuration options in Apache for WSGI.

Kurtis
  • 11
  • 1
0

Modify the nginx configuration and increase the proxy_read_timeout value.

"This directive sets the read timeout for the response of the proxied server, in seconds by default. It determines how long nginx will wait to get the response to a request. The timeout is established not for entire response, but only between two operations of reading." --Nginx Documentation

http://wiki.nginx.org/HttpProxyModule#proxy_read_timeout

Sameer
  • 4,118
  • 2
  • 17
  • 11
  • as i mentioned in my question, i tried that already. i set it to 300 and it still timed out in less than a minute. – Kevin May 07 '11 at 03:39