You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project is using Flask-Socketio for websocket support.
My entrypoint is: entrypoint: gunicorn supervisor.wsgi:app -k eventlet
I also set network: session_affinity: true
Everything is running except the websocket, I get the following error on Firefox: Firefox can’t establish a connection to the server at wss://myproject.appspot.com/socket.io/?EIO=3&transport=websocket&sid=500afafea543442dad546cc325ce5def.
There is no such error when running my project with the same command on my computer.
The samples are built around flask-sockets so that we can leverage the gunicorn flask_sockets.worker, which allows gunicorn to simultaneously serve http and websocket traffic. I don't think socketio on Python is compatible with gunicorn out of the box; you may have to explore alternative webservers to make this work.
I don't know why it's working on your local machine, though. What command are you running locally to start the server?
Closing this as we don't currently have a good solution for adding support for both socketio and other strategies in the same sample on Python, and it's not a bug in an existing sample.
Activity
andrewsg commentedon Sep 3, 2019
The samples are built around flask-sockets so that we can leverage the gunicorn flask_sockets.worker, which allows gunicorn to simultaneously serve http and websocket traffic. I don't think socketio on Python is compatible with gunicorn out of the box; you may have to explore alternative webservers to make this work.
I don't know why it's working on your local machine, though. What command are you running locally to start the server?
Altiire commentedon Sep 4, 2019
To support web sockets :
sample of supervisor/app.py
If I remember well, the socket was working on GAE in July, and not now as I just checked
The eventlet worker is supposed to support socketio
andrewsg commentedon Mar 9, 2020
Closing this as we don't currently have a good solution for adding support for both socketio and other strategies in the same sample on Python, and it's not a bug in an existing sample.