Maximum number of client connections in Flask-SocketIO with Eventlet
It’s not mentioned in the docs for Flask-SocketIO that Eventlet has an option max_size
which by default limits the maximum number of client connections opened at any time to 1024
. There is no way to pass it through flask run
command,
so the application should be run with socketio.run
, for example:
...
if __name__ == '__main__':
socketio.run(app, host='0.0.0.0', port='8080', max_size=int(os.environ.get('EVENTLET_MAX_SIZE', 1024)))