0

I'm going to add these configuration:

proxy_connect_timeout 300s;
proxy_read_timeout 300s;

and for Gunicorn:

gunicorn_django -D -b 127.0.0.1:8901 --workers=5 --pid=/var/webapp/campus.pid --settings=settings.production --timeout 300 --pythonpath=/var/webapp/campus/

Can this cause any problems I do not know about?

(Additional context)

dev fan
  • 1
  • 1

1 Answers1

0

Per nginx document you can't give this much big timeout. Also it depend on tcp defaults to maintain connections.

Syntax: proxy_connect_timeout time;
Default:    
proxy_connect_timeout 60s;

Context: http, server, location Defines a timeout for establishing a connection with a proxied server. It should be noted that this timeout cannot usually exceed 75 seconds. https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_connect_timeout

Adverse effect will be connections exhausted, connections leak etc.

asktyagi
  • 2,401
  • 1
  • 5
  • 19