Django Gunicorn Nginx Timout erhöhen

In Django, Gunicorn, Nginx by oesahLeave a Comment

Wie man die Timeout richtig erhöht mit Nginx, Django und Gunicorn.

Tipps:

  • Timout von nginx und Gunicorn müssen gleich sein
  • Egal ob man im http, server oder location Ebene einfügt
  • Wenn SSL, muss in nginx.conf und nginx-secure.conf sein
 keepalive_timeout 300s;
 proxy_connect_timeout 300s;
 proxy_send_timeout 300s;
 proxy_read_timeout 300s;
 send_timeout 300s;

Gunicorn

gunicorn config.wsgi -w 4 --timeout 300 --graceful-timeout 300 -b 0.0.0.0:5000

Quellen:

Leave a Comment