Nginx上的烧瓶应用程序在1分钟后超时

Nginx上的烧瓶应用程序在1分钟后超时,nginx,flask,uwsgi,Nginx,Flask,Uwsgi,我正试图通过uWSGI在Nginx上提供Flask应用程序(第一次使用Nginx for Flask) Nginx配置看起来像: server { listen 80; location / { include uwsgi_params; uwsgi_pass flask:5555; } client_max_body_size 100M; client_header_timeout 120s; client

我正试图通过uWSGI在Nginx上提供Flask应用程序(第一次使用Nginx for Flask)

Nginx配置看起来像:

server {

    listen 80;

    location / {
        include uwsgi_params;
        uwsgi_pass flask:5555;
    }

    client_max_body_size 100M;

    client_header_timeout 120s;
    client_body_timeout 120s;
    keepalive_timeout 120s;
    send_timeout 120s;
}

和uWSGI

wsgi-file = run.py
callable = app
socket = :5555
processes = 4
threads = 2
master = true
chmod-socket = 660
vacuum = true
die-on-term = true
但不管怎样,负载更大的Flask应用程序在Nginx端都会在1分钟后超时

从终端运行Flask应用程序时,工作正常


有什么提示吗?

解决了在
nginx.conf
中为uWSGI添加超时的问题

server {

    listen 80;

    location / {
        include uwsgi_params;
        uwsgi_pass flask:5555;
        uwsgi_read_timeout 300;
    }

    client_max_body_size 100M;

    client_header_timeout       120s;
    client_body_timeout         120s;
    keepalive_timeout           120s;
    send_timeout                120s;
}

解决了在
nginx.conf
as中向uWSGI添加超时的问题

server {

    listen 80;

    location / {
        include uwsgi_params;
        uwsgi_pass flask:5555;
        uwsgi_read_timeout 300;
    }

    client_max_body_size 100M;

    client_header_timeout       120s;
    client_body_timeout         120s;
    keepalive_timeout           120s;
    send_timeout                120s;
}