I have also tested setting the timeouts to 30s but they still timeout at 1 minute.
#Nginx gateway timeout setting full#
Just not changes to the timeouts (or maybe the full http section?). I have tested changing the number of worker_processes in the config file just to make sure that changes to other things in the config file did get picked up and sure enough changing that number changes the number of workers so the file os the correct file and changes to get picked up by Nginx. OS version: Ubuntu 16.04.1 and Ubuntu 14.04.5 LTS Nginx version: nginx/1.12.2 and nginx/1.4.6 (Ubuntu) Running $ /usr/sbin/nginx -V 2>&1 | grep conf shows the config file is located at -conf-path=/etc/nginx/nf When I run my application without Nginx and run the same curl -o the request takes quite a while (up to 8 minutes depending on the requested data) but it does finish properly without errors or a timeout. % Total % Received % Xferd Average Speed Time Time Time Currentġ00 183 100 183 0 0 3 0 0:01:01 0:01:00 0:00:01 48Īnd this error gets written to error.log 6 09:55:15 10105#10105: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 142.1.2.3, server: localhost, request: "GET /my/url", upstream: "uwsgi://unix:/tmp/my-applacation.sock", host: "142.1.2.3" $curl -o out-put-file.csv "./localhost/my/url" This has been further tested by running a curl -o on the server to bypass any service provider issues. I've also tried adding a nf file to /etc/nginx/conf.d/ as suggested by : proxy_connect_timeout 600 Īfter making each change I've restarted the server but the timeout still happens after 1 min. I'm looking for a way to increase the Nginx timeout from 1 minute to about 10 minutes.Ĭhanging the nf file to include the following lines between the http braces uwsgi_connect_timeout 75s The files themselves are CSV files and not very large so the downloads are fast after the backend has generated the file, but I need a way to make Nginx wait longer. Because there is no response within a minute Nginx returns a 504 Gateway Time-out. So when complex data is requested the Python backend takes more than a minute to generate the file and start the download. The problem is that the data files are only generated when requested.
#Nginx gateway timeout setting download#
The site works fine under most conditions and users can download some files without issue. The website allows users to download custom data files. I'm getting a 504 timeout on my Nginx server: