ubuntu - Python Nginx Production Timeout -
i have built quick bottle app calls external api , updates few fields. when run app on dev machine runs 3 minutes api talking rather slow.
when move app our production environment, getting 502 response. bombs out 30 seconds after starting. beleive timeout.
i followed guide setup environment: https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
anyone have idea how increase timeout on nginx? have tried using setting proxy_connect_timeout nginx conf file, nothing resolve issue:
proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300;
any appreciated.
you try upgrading timeout proxy pass in nginx adding:
proxy_connect_timeout 75s; proxy_read_timeout 300s;
on /etc/nginx/sites-available/default
or /etc/nginx/nginx.conf
if want increase timeout limit on sites served nginx.
you must add --timeout 300 gunicorn process/config.
this solved problems in past bigger uploads.
Comments
Post a Comment