Flask-SocketIO client connections failing at just over 1000 connections #1813
Unanswered
DouglasLapsley
asked this question in
Q&A
Replies: 1 comment 4 replies
-
This package does not manage client connections, and does not impose any limits on how many of them can be active at a time. I think this is something that you need to figure out on the web server side, it might be an issue with eventlet. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Ubuntu 20.04 on EC2 instance
Flask-SocketIO 5.1.1
python-engineio 4.2.1
python-socketio 5.4.0
simple-websocket 0.3.0
I'm doing some load testing on this server to maximise the number of client connections I can get out of it. The server python code includes the following main elements:
Note the
max_size
arg insocketio.run()
passing through to themax_size
eventlet param.I have set the file descriptor limits with
sudo nano /etc/security/limits.conf
as follow:I can confirm this with
ulimit -a
which gives output:I am load testing with the following code (reduced for brevity) which creates 2000 connections running from my local machine:
When I run this, around 1176 connections are made successfully, and then they fail to be created after that point and I get a high CPU process in
htop
of process/usr/lib/snapd/snapd
and the socket.io python app terminates printing the message "Killed" after a few seconds.I need to support around 5000 connections minimum on this server. I understand that it is possible, but how do I do that please?
Beta Was this translation helpful? Give feedback.
All reactions