Replies: 1 comment 1 reply
-
I'm not really sure how I can help with this, as it is unrelated to Flask-SocketIO. If you are sure that you have Redis running and you have confirmed that you can connect to it without eventlet, then this could be an eventlet bug. You can try asking in the Eventlet project, but keep in mind Eventlet is not in active development anymore, so it isn't a great idea to use it on new projects. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
import eventlet
eventlet.monkey_patch()
import redis
redis_client = redis.StrictRedis(host='localhost', port=6379, charset='utf-8', decode_responses=True)
try: redis_client.ping() print("Redis connected") except Exception as e: print("Cannot connect to Redis:", e)
Someone please help me, I was planning to use monkey_patch() to be able to use SocketIO's message_queue, but adding monkey_patch() I can't connect to Redis server "Cannot connect to Redis: Error 11001 connecting to localhost:6379. No address found."
But if I remove monkey_patch(), the connection is still possible.
Beta Was this translation helpful? Give feedback.
All reactions