I am able to run redis locally and everything works.
However when I deploy to heroku I get this error:
Error 111 connecting to localhost:6379. Conn
I was facing same the error
Maybe radis server was not installed in your environment
sudo apt-get install redis-server
I needed to set up things like this in settings.py
redis_host = os.environ.get('REDIS_HOST', 'localhost')
# Channel layer definitions
# http://channels.readthedocs.org/en/latest/deploying.html#setting-up-a-channel-backend
CHANNEL_LAYERS = {
"default": {
# This example app uses the Redis channel layer implementation asgi_redis
"BACKEND": "asgi_redis.RedisChannelLayer",
"CONFIG": {
"hosts": [(redis_host, 6379)],
},
"ROUTING": "multichat.routing.channel_routing",
},
}
Before
After