I'm trying to configure uWSGI for an application (Django) that uses http & websocket queries.
Here is the uWSGI ini
file that I did to achieve this
[uwsgi]
ini = :runserver
ini = :wsserver
[default]
userhome = /home/myuser
virtualenv = %(userhome)/.virtualenvs/myapp
chdir = %(userhome)/Documents/myapp
master = true
no-orphans = true
uid = www-data
gid = www-data
threads = 1
env = DJANGO_SETTINGS_MODULE=myapp.settings
vacuum = true
[runserver]
ini = :default
socket = /tmp/myapp.sock
module = wsgi_django
buffer-size = 32768
processes = 4
[wsserver]
ini = :default
http-socket = /tmp/myapp_websocket.sock
module = wsgi_websocket
processes = 2
http-websockets = true
gevent = 1000
As you can see I'm including both my services runserver
& websocket
from uwsgi
.
I see nginx and uwsgi communicating between them but nginx always returns me
NetworkError: 502 Bad Gateway
I see no error in uwsgi log but if I comment one of them, the other works.
Can somebody help me to debug that ?