Nginx timeouts when uWSGI takes long to process request

前端 未结 4 1319
暗喜
暗喜 2021-01-31 15:05

I have Nginx + uWSGI for Python Django app.

I have the following in my nginx.conf:

location / {
    include uwsgi_params;
    uwsgi_pass            


        
4条回答
  •  不知归路
    2021-01-31 15:36

    Solved by changing the following Nginx config

    proxy_connect_timeout 300;
    proxy_read_timeout    300;
    
    
    client_body_timeout   300;
    client_header_timeout 300;
    keepalive_timeout     300;
    

    And UWSGI setting

    http-timeout = 300 // or 'socket-timeout = 300' depending on uwsgi setting
    

提交回复
热议问题