Nginx + uWSGI错误:请求已取消(等待标头时超出Client.Timeout)

时间:2019-08-27 09:59:09

标签: python nginx uwsgi

我将nginx + uwsgi组合用于Post API。

API端点预计将收到3000 reqeust / 10秒

源计算机有时无法发布带有错误的请求

net/http: request canceled (Client.Timeout exceeded while awaiting headers)

我在nginx上有以下设置

           location / {

            proxy_pass http://127.0.0.1:5000;
            uwsgi_read_timeout 300s;
            include uwsgi_params;
           }

     http {
               tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 30;
    keepalive_requests 100000;
    reset_timedout_connection on;
    client_body_timeout 10;
    send_timeout 2;
    types_hash_max_size 2048;
    client_max_body_size 20M;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;
}

events {
    worker_connections 1024;
    use epoll;
    multi_accept on;
}

0 个答案:

没有答案