$request_time in nginx logs is the time taken by the request from when it was first received in nginx and till the response was sent back by nginx to client.
In my nginx config, the request is closed by nginx and marked 504 gateway timeout when $request_time reaches 60s
I have tried using following location context directives:
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
send_timeout 300s;
uwsgi_read_timeout 300s;
uwsgi_send_timeout 300s;
But still facing the same issue. Is there some config that i am missing?
Here is the location context of my nginx.conf
location / {
set $uwsgi_script "wsgi";
set $script_name "/";
set $socket "uwsgi.sock";
#client_max_body_size 1000m;
keepalive_timeout 0;
# host and port to uwsgi server
uwsgi_pass unix:///tmp/$socket;
uwsgi_param UWSGI_SCRIPT $uwsgi_script;
uwsgi_param SCRIPT_NAME $script_name;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
send_timeout 300s;
uwsgi_pass_header Authorization;
include /etc/nginx/uwsgi_params;
#fix redirect issue to proxy port
uwsgi_param SERVER_PORT 80;
#set correct scheme
uwsgi_param UWSGI_SCHEME $http_x_forwarded_proto;
uwsgi_intercept_errors off;
uwsgi_read_timeout 300s;
uwsgi_send_timeout 300s;
}