My stack is Django + uWSGI + NGINX. We have certain client requests that can take a really long time to fulfill, and we're trying to optimize our timeouts for different endpoints depending on their estimated processing time. I can do this in NGINX using location blocks, but uWSGI's harakiri setting is application-wide and doesn't discriminate between endpoints.
My question is, if I set the NGINX timeout for an endpoint to 30s, but uWSGI has a harakiri timeout of 60s, will the application keep working until that 60s is reached, regardless of client timeout at 30s?
For some more context, here's an example from our NGINX config:
location /example/path {
if ($http_x_forwarded_proto != "https") {
return 301 https://$server_name$request_uri;
}
include /sites/example/confs/server/nginx_redirects.conf;
send_timeout 30;
uwsgi_pass unix:///tmp/example.com.sock;
uwsgi_read_timeout 30;
include uwsgi_params;
include /etc/nginx/proxy/nginx_proxy.conf;
}