python - uwsgi_response_write_body_do() TIMEOUT - But uwsgi_read_timeout not helping (x-post) -


i keep getting error on interfacing nginx:

uwsgi_response_write_body_do() timeout !!! ioerror: write error 

it's working fine. happens when test 50+ concurrent connections hitting method sends down 200mb of data.

i've been searching on i'm seeing advise increase uwsgi_read_timeout :-(

(i asked on uwsgi github page, i'm thinking since it's not bug it's better ask here)

here's how i'm launching uwsgi:

flask/bin/uwsgi -s 127.0.0.1:9001 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_01.log flask/bin/uwsgi -s 127.0.0.1:9002 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_02.log flask/bin/uwsgi -s 127.0.0.1:9003 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_03.log flask/bin/uwsgi -s 127.0.0.1:9004 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_04.log flask/bin/uwsgi -s 127.0.0.1:9005 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_05.log flask/bin/uwsgi -s 127.0.0.1:9006 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_06.log flask/bin/uwsgi -s 127.0.0.1:9007 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_07.log flask/bin/uwsgi -s 127.0.0.1:9008 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_08.log flask/bin/uwsgi -s 127.0.0.1:9009 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_09.log flask/bin/uwsgi -s 127.0.0.1:9010 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_10.log flask/bin/uwsgi -s 127.0.0.1:9011 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_11.log flask/bin/uwsgi -s 127.0.0.1:9012 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_12.log flask/bin/uwsgi -s 127.0.0.1:9013 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_13.log flask/bin/uwsgi -s 127.0.0.1:9014 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_14.log flask/bin/uwsgi -s 127.0.0.1:9015 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_15.log flask/bin/uwsgi -s 127.0.0.1:9016 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_16.log flask/bin/uwsgi -s 127.0.0.1:9017 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_17.log flask/bin/uwsgi -s 127.0.0.1:9018 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_18.log flask/bin/uwsgi -s 127.0.0.1:9019 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_19.log flask/bin/uwsgi -s 127.0.0.1:9020 --need-app --wsgi-file app.py --processes 1 --callable app --daemonize /opt/logs/kvautobus-uwsgi_20.log 

here /etc/nginx/nginx.conf:

user  nginx; worker_processes  10;  error_log  /var/log/nginx/error.log warn; pid        /var/run/nginx.pid;  events {     worker_connections  2024; } http {     include   /etc/nginx/mime.types;     default_type  application/octet-stream;     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                       '$status $body_bytes_sent "$http_referer" '                       '"$http_user_agent" "$http_x_forwarded_for"';      access_log  /var/log/nginx/access.log  main;     sendfile        on;     #tcp_nopush     on;     keepalive_timeout  20;     gzip  on;     include /etc/nginx/conf.d/*.conf; } 

here /etc/nginx/conf.d/default.conf:

upstream internal {     least_conn;     server 127.0.0.1:9001;     server 127.0.0.1:9002;     server 127.0.0.1:9003;     server 127.0.0.1:9004;     server 127.0.0.1:9005;     server 127.0.0.1:9006;     server 127.0.0.1:9007;     server 127.0.0.1:9008;     server 127.0.0.1:9009;     server 127.0.0.1:9010;     server 127.0.0.1:9011;     server 127.0.0.1:9012;     server 127.0.0.1:9013;     server 127.0.0.1:9014;     server 127.0.0.1:9015;     server 127.0.0.1:9016;     server 127.0.0.1:9017;     server 127.0.0.1:9018;     server 127.0.0.1:9019;     server 127.0.0.1:9020; }  server {      listen   9000 default_server;     server_name  _;   proxy_max_temp_file_size 4024m;   #access_log  logs/host.access.log  main;   location / {     uwsgi_pass         internal;      uwsgi_param   host                 $host;     uwsgi_param   x-real-ip            $remote_addr;     uwsgi_param   x-forwarded-for      $proxy_add_x_forwarded_for;     uwsgi_param   x-forwarded-proto    $http_x_forwarded_proto;      #not sure timeout parameter need     proxy_read_timeout 600;     proxy_connect_timeout 1d;     proxy_max_temp_file_size 5024m;     proxy_send_timeout 600;     uwsgi_read_timeout 600;     uwsgi_send_timeout 600;     include uwsgi_params;   } } 


Comments