I am using flask socket.io configured with eventlet on a flexible google
appengine instance. According to the flask socket.io documentation:
https://flask-socketio.readthedocs.io/en/latest/ running
`socketio.run(app)` will start a webserver if eventlet is installed.
I have a local react web app attempting to establish a WebSocket connection
with this app engine instance. The web app uses socket.io and initially
defaults to polling HTTP requests. These requests all timeout-- I'm unable
to establish a web socket connection. I'm not sure what might be causing my
issue, whether it is my app engine configuration or my flask socket.io
setup.
Here is my initialization code for flask socket.io:
app = Flask(__name__)
socketio = SocketIO(app)
socketio.init_app(app, cors_allowed_origins="*")
..
..
if __name__ == '__main__':
socketio.run(app, debug=True)
Here is my app.yaml:
runtime: python
env: flex
entrypoint: python3 server.py
runtime_config:
python_version: 3
manual_scaling:
instances: 1
network:
session_affinity: true
Here is the web app code attempting to set up the connection:
import io from 'socket.io-client'
const socketURL = "<app-engine-instance-url>:5000"
const socket = io.connect(socketURL)
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/6020dc73-cc53-45e8-b5e8-ec7456e24758%40googlegroups.com.