Page tree
Skip to end of metadata
Go to start of metadata

If you are using nginx-proxy for the USxS reverse proxy, you may encounter 504 timeout errors in the browser for some long running operations.  For example, when a user executes a large report, the response may not start within the default proxy timeouts.  Follow the instructions below to increase the timeouts.

Step-by-step guide

These instructions assume you are using nginx-proxy as described in Using nginx-proxy.  The proxy starting proxy configuration should look something like this:

proxy:   image: jwilder/nginx-proxy
   restart: always
   volumes:
     - /var/run/docker.sock:/tmp/docker.sock:ro
     - ./certs:/etc/nginx/certs:ro
     - ./vhost.d:/etc/nginx/vhost.d
     - ./html:/usr/share/nginx/html
   environment:
     - DEFAULT_HOST=demo.example.com
   ports:
     - "80:80"
     - "443:443"


  1. Mount an additional volume in the container at /etc/nginx/conf.d by adding the following line to the volumes key: 

       - ./conf.d:/etc/nginx/conf.d

    during startup, nginx will read all config files from this directory.

  2. Place create a file named ./conf.d/proxy-settings.conf containing: 

    proxy_connect_timeout       300;
    proxy_send_timeout          300;
    proxy_read_timeout          90m;
    send_timeout                300;
    
    
    client_max_body_size        5000m;

    This sets a 300 second (5 minute) timeout for most timeouts and 90 minutes for read-timeout.  The read-timeout may seem excessive.  However, when generating large or long-running reports the USxS applications can hold the browser connection for a considerable length of time.

    The client_max_body_size effects file uploads to the application server. If users are having trouble uploading files to the application, increase this setting. If districts are uploading the Classic MonthlyCD, this may need to be adjust to at least 5000m.  Remember to restart the proxy for this setting to take effect.

  3. Rebuild and restart the proxy with: 

    docker-compose up -d


The files in ./conf.d are global to the entire web server and affect all backend servers.