Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Well it should, can you show how did you configure your timeouts/server? –  coredump May 7 '11 at 3:12

2 Answers 2

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.

share|improve this answer

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

share|improve this answer
    
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 7 '11 at 3:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.