In the use of uwsgi To configure dwebsocket When , There will always be usage problems .
image-20200420111715653
however , Use it directly python manage.py runserver
There's no problem starting .
The main reason is not in the project settings
Profile Settings uwsgi
Support dwebsocket
.
# To configure uwsgi Support dwebsocket WEBSOCKET_FACTORY_CLASS = 'dwebsocket.backends.uwsgi.factory.uWsgiWebSocketFactory'
# Setting asynchronous options async = 30 ugreen = '' http-timeout = 300
http { ... server { listen 80; server_name localhost; #charset koi8-r; access_log logs/host.access.log main; # Configure dynamic request to use uwsgi location / { include uwsgi_params; # Import nginx And uwsgi Communication module uwsgi_connect_timeout 30; # Set up the connection uWSGI Timeout time uwsgi_pass unix:/work/performance/uwsgi.sock; # Appoint uwsgi Of sock file : All dynamic requests are forwarded directly } # Configure static file path location /static/ { alias /work/performance/static/; } } }
This article is from WeChat official account. - Fisherman of the sea (DevOpsFreshMan) , author :Devops Fisherman of the sea
The source and reprint of the original text are detailed in the text , If there is any infringement , Please contact the [email protected] Delete .
Original publication time : 2020-11-11
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .