Skip to content
Discussion options

You must be logged in to vote

Oh wow thank you so much for the help, really appreciate it.

I ended up trying redis memorystore from google cloud and it seems to have solved my problem. For anyone who comes across this in the future follow along here and use the following for the gunicorn command.

gunicorn --worker-class eventlet --bind :$PORT --workers 1 --timeout 0 server:app

Define socket IO like this:

socketio = SocketIO(app, message_queue=f'redis://{redis_host}:{redis_port}')

Lastly run the app like so:

socketio.run(app, host='127.0.0.1', port=8080, debug=False)

Leave the following the eventlet monkeypatch at the top of the server.py. Make sure you import redis in your server.py. See below:

import eventlet
eventle…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@charbelmarche33
Comment options

Answer selected by charbelmarche33
@miguelgrinberg
Comment options

@charbelmarche33
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants