Why will asyncio and uwsgi work with nginx?

1) I want one process per core

2) here is my nginx

server {

listen 80;

listen [::]:80 ipv6only=on default_server;

server_name 127.0.0.1;

location = /favicon.ico {

          log_not_found off;

}

location / {

       include uwsgi_params;

       uwsgi_buffering off;

       uwsgi_pass 127.0.0.1:8030;

}

}


Here Is my supervisor:

[program:dude]
environment=PYTHONPATH=/var/dude
autostart=true
autorestart=true
process_name = pixel-%(process_num)s
command = /usr/local/bin/uwsgi --yaml /var/dude.uwsgi.yaml
--port=%(process_num)s
--log_file_prefix=%(here)s/logs/%(program_name)s-%(process_num)s.log
numprocs_start = 8030
[group:dude_se

Here is my yaml file


uwsgi:
pidfile: /var/run/dude.pid
asyncio: 10
greenlet: true
socket: 127.0.0.1:8030
processes: <%= node["cpu"]["total"] %>
logto2: /tmp/dude.log
touch-reload: /var/dude/app.py
master-fifo: /tmp/uwsgi_dude_master_fifo
wsgi-file: /var/dude/app.py
callable: app
pp: [/var/dude]

nginx/error.log

2017/08/03 17:27:27 [alert] 30996#30996: *1 open socket #3 left in
connection 3

2017/08/03 17:27:27 [alert] 30996#30996: *3 open socket #12 left in
connection 5

2017/08/03 17:27:27 [alert] 30996#30996: aborting

2017/08/03 17:28:28 [error] 31058#31058: *1 upstream timed out (110:
Connection timed out) while reading response header from upstream, client:
xxx.xxx.xxx.xxx, server: 127.0.0.1, request: "GET / HTTP/1.1", upstream:
"uwsgi://127.0.0.1:8030", host: "xxx.xxx.xxx.xxx.compute-1.amazonaws.com"
_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to