Problems with nginx reverse proxy

I have a python application hosted under gunicorn that is expected to
have long lived requests.It works just fine if we hit the application
directly; however, we want to have nginx in front of it and are having
issues with 504 errors.
I found some settings on-line that seem to be what we want to change,
specifically the proxy_*_timeouts and send_timeout, and applied them to
an environment. However, no matter what I try it always fails at 60
seconds.Here’s the settings I am presently trying:

    # Force HTTP/1.1 over proxy and its Keep-Alive functionality
    proxy_http_version 1.1;
    proxy_set_header Connection "";

    # Disable request buffering so requests go immediately to server
    proxy_request_buffering off;

    # Timeouts
    # Connect, Send Normal Timeout (60 seconds) OK
    # Proxy Back-end Timeout (10m default) probably needs to be long
    # Read/Client Send Timeout (60 second default) must be very long
    proxy_timeout 3600;
    proxy_connect_timeout 1800;
    proxy_read_timeout 1800;
    proxy_send_timeout 1800;
    send_timeout 1800;

These are all applied on the location second. I’ve tried these setting
under both the location section and the server section, but there
doesn’t seem to be any difference.

What am I missing?
TIA,
Ben

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs