-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resources not being released - Too many open files #38
Comments
Thanks. Might be addressed by #20, which I'm still reviewing. |
Thank you so much for the details. I believe the fix referenced above (which I just merged) addressed your issue. Could I ask you to install simple-websocket's main branch from GitHub and retest? Let me know if the issue is addressed. |
Superb work! It fixes the issue. I don't see the number of handles rise after I've closed the page. Could you provide a release? |
Please hold off. I'm facing another issue and I'm not sure if it's related. I would like to double check my results. |
It looks like the issues I'm seeing are unrelated to this specific change. I'll investigate the the issue I'm seeing before filing a ticket to see if it's my code. |
simple-websocket 0.9.0 is out with this fix. |
I'm using this lovely library to facilitate socket communication. I really like this because it's so light. However, I ran into an issue where I've noticed that resources are not being released.
Issue
I was running a server for an extended period of time and repeatedly opening and close the page. It got to a point where the server started throwing "too many files open errors". I looked more into this and found that there are a lot of
eventpoll
handles open. This can be seen using thelsof
command on the PID of the flask processes.Repro
Create basic setup for web socket.
Files:
Steps:
You'll see the number go up after every time the page gets reloaded.
System Info
I've reproduced this issue on Ubuntu and Raspian OS environments.
I'm using Python 3.9.2
Here's the Python packages I'm using.
The text was updated successfully, but these errors were encountered: