环境: Python(3.8.x)+Flask+uWSGI+Nginx+宝塔
报错示例:
uwsgi_response_write_body_do() TIMEOUT !!!
OSError: write error
解决方案
修改Nginx子配置文件,禁用临时文件缓冲器
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:5000;
uwsgi_connect_timeout 600;
uwsgi_read_timeout 600;
uwsgi_send_timeout 600;
uwsgi_max_temp_file_size 0; # 禁用临时文件缓冲器
}