Socket circular reference in CherryPy server?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- backend, networking
Research direction
Start by reproducing the issue with the CherryPy server: repeatedly refresh a websocket page, inspect the garbage collector's SSLSocket objects, and observe whether sockets remain until a full sweep. Compare this with the reported cheroot workaround of collecting after accept() raises OSError. Done means identifying and preventing the retained connection objects from exhausting file descriptors.
Written by the indexing model from the issue text.
Description
With the CherryPy server, if you repeatedly refresh a page with websockets, then iterate the gc module's list of objects for SSLSockets, you might find an extra object for every connection.
These are collected at the next "full" sweep, but if that does not happen, eventually an OSError will occur from too many open files(On Linux).
As a workaround, I patched my copy of cheroot to do GC when accept() raises OSError.
I have heard that in the past inspecting stack frames can do odd things on very old version of python. I wonder some remnant of that bug could be related to this?
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 285
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Lawouach/WebSocket-for-Python
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Lawouach/WebSocket-for-Python#300 ·
-
question
Lawouach/WebSocket-for-Python#297 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Lawouach/WebSocket-for-Python#296 ·
-
Lawouach/WebSocket-for-Python#280 · 1 comment · 1 assignee ·
-
Setup new CI Open
Lawouach/WebSocket-for-Python#275 · 1 assignee ·
All issues in Lawouach/WebSocket-for-Python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100