django


How to run 2 sites with Django channels on the same host?


I tried to start 2 daphne servers and 2 workers with supervisord.
But sometimes requests from site #1 are on worker #2 and requests from site #2 are on worker #1.
Should I use different Redis servers? Rly?
Or am I missing some parameter in settings?
CHANNEL_LAYERS = {
'default': {
'BACKEND': 'asgi_redis.RedisChannelLayer',
'CONFIG': {
'hosts': [('{{redis_server}}', 6379)],
},
'ROUTING': '{{app}}.routing.channel_routing',
},
}
You need unique prefix parameter:
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [("localhost", 6379)],
"prefix": "gradcam",
},
"ROUTING": "gradcam.routing.channel_routing",
},
}

Related Links

How to delete a lot of objects from database
How to use image field in Django unit test
Django and radio buttons
django i18n translation not working on nginx but works on runserver
Django Form won't render
Django: Permissions granted to auth user but not there in view / template?
How do I reset the django cache for static file names?
Apache HTTP Basic Auth - 401 error after supplying username and password
Unable to load require.config dependency when using with Django
How i can show list of objects that have no related object?
Using mixins in class based view - Django
Can I specify a multiline context variable/parameter when {% include %}ing a template?
Django admin panel throws 404 when passing any url parameters
ManyRelatedManager object is not iterable
Ajax form submission, files not getting submitted
Separation of Static Files & Assets with Django Compressor & Usage of collectstatic

Categories

HOME
search
microsoftgraph
twitter-bootstrap-3
prism
spark-streaming
object
3d
alsa
hugo
nested-if
regular-language
interpolation
hpc
mapbox
jtextpane
trac
fabric.io
little-proxy
siddhi
windows-ce
cmdb
google-form
stellar.js
glyphicons
job-scheduling
video-editing
visual-glitch
ember-cli
tiki-wiki
fractions
rpgle
errbot
panoramas
paragraph
weather
kodi
git-squash
keras-layer
hunspell
python-pptx
amazon-ses
spring-mvc-test
news
kill
skylink
movilizer
xmldocument
httr
getchar
openal
openrasta
convex-optimization
lightning
carrot2
skin
dt
quicktime
objectscript
rxtx
sandcastle
taocp
visual-studio-2008-sp1
resourcemanager
omniauth-facebook
riot
nss
cda
toast
contentcontrol
ascii-art
vigenere
rpart
sql-server-data-tools
infosphere-spl
metatrader5
entry-point
grails-plugin-rabbitmq
wxformbuilder
menubar
ecslidingviewcontroller
mongohq
cmmi
process-explorer
pagedown
video-codecs
onload-event
mantle
stacky
koken
agility.js
google-ajax-api
strsep
diagrams
updatesourcetrigger
wordprocessingml
fail-fast-fail-early
int64
soappy

Resources

Encrypt Message