Description
β I'm submitting a ...
- π bug report
- π£ feature request
- β question about the decisions made in the repository
π Describe the bug. What is the current behavior?
In an environment where the automatic garbage collection is disabled by default and gc.collect(2)
is called manually (in this case, once every 10 minutes), there has been a considerable increase in the size of the garbage collector.
After analysis, this is the cause:
Lines 1264 to 1271 in 1391e71
Reassigning a method to an object creates a circular reference.
β What is the motivation / use case for changing the behavior?
This feature seems to be here for caching UNIX sockets credentials. But we use cheroot only for internet connection so this cache system is useless. And even for a UNIX server, this piece of code creates some problems.
π‘ To Reproduce
Steps to reproduce the behavior:
- Run a server with automatic garbage collection disabled and log number of objects in garbage ( using
len(gc.get_objects())
) at regular interval. - Have a script which makes a lot of temporary connections ( without
Keep-Alive
). - We can see the increase in the number of items tracked by the garbage collector.
π‘ Expected behavior
No memory leak.
π Details
π Environment
- Cheroot version: 10.0.1
- CherryPy version: None
- Python version: 3.11.11
- OS: Linux
- Browser: all
π Additional context