--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY5SQzRG-7EuEM8rZvOfQor5bBOjt%3DBV1Qsbn9%2BBhMx12g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN7EoAbSAVUT%3D8sg1o-0oczCfjfRhtGwrMDE31YBt9N%2Bm96YmA%40mail.gmail.com.
upstream django {
# server unix:/run/uwsgi/devAppReporting.sock;
}
server {
listen 8090;
server_name foo.bar.com;
charset utf-8;
location /static {
alias /var/dev-app-reporting/static;
}
location / {
uwsgi_pass django;
include /var/dev-app-reporting/uwsgi_params;
uwsgi_read_timeout 3600;
client_max_body_size 50m;
}
}
Now I changed it to this:
upstream django {
server unix:/run/daphne/devAppReporting.sock;
}
server {
listen 8090;
server_name foo.bar.com;
charset utf-8;
location /static {
alias /var/dev-app-reporting/static;
}
location / {
proxy_pass http://0.0.0.0:8090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
Started daphne like this:
daphne -u /run/daphne/devAppReporting.sock app.dse.asgi:application
I get a 502 bad gateway error and this in the log:
2020/02/24 22:17:26 [alert] 29169#29169: 768 worker_connections are not enough
2020/02/24 22:17:26 [error] 29169#29169: *131545 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 127.0.0.1, server: dse-portfolio-dev-assessments.md.virtualclarity.com, request: "GET / HTTP/1.1", upstream: "http://0.0.0.0:8090/", host: "xx.xx.xx.xx"
Any ideas on what I should have in my config file for this to work?