You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
β question about the decisions made in the repository
π Describe the bug. What is the current behavior?
When enabling ssl_adapter on WSGIServer, there is a memory leak each time a connection is received
β What is the motivation / use case for changing the behavior?
π‘ To Reproduce
Using example code from cheroot with added ssl_adapter allows to reproduce the bug
Make some requests: for I in $(seq 2000); do wget --quiet -O /dev/null --no-check-certificate https://localhost:8078 ; done
See error: read RSS value from following command each time requests are made to server ps wu -p $(pgrep cheroot_test)
RSS value increases and never goes down.
π‘ Expected behavior
Stable memory consumption for a server usage
Hello. Is this reproducible with a distro-default Python in any official/public container image? I'd rather not have a repro dependent on compiling CPython from scratch.
you can reproduce this issue on Debian bookworm (12.5)
python version 3.11.2
cheroot version 9.0.0
I also managed to reproduce the same issue with cheroot version 10.0.0 in a virtual environment on the same system.
No log or console log, as everything works fine, but this memory leak
If needed, you can generate your certificate with following command : openssl req -x509 -newkey rsa:2048 -nodes -keyout server.key -days 365 -out server.crt
After further investigation the leak appeared in version 8.3.0
Older versions do not seem to leak.
We suspect BuiltinSSLAdapter.get_environ(self, sock) method to be the root cause.
Removing all code in this method except the first dict creation, seems to solve leak issue.
I hope this may help you to target the problem ...
β I'm submitting a ...
π Describe the bug. What is the current behavior?
When enabling ssl_adapter on
WSGIServer
, there is a memory leak each time a connection is receivedβ What is the motivation / use case for changing the behavior?
π‘ To Reproduce
Using example code from cheroot with added
ssl_adapter
allows to reproduce the bugSteps to reproduce the behavior:
Run this server:
Make some requests:
for I in $(seq 2000); do wget --quiet -O /dev/null --no-check-certificate https://localhost:8078 ; done
See error:
read RSS value
from following command each time requests are made to serverps wu -p $(pgrep cheroot_test)
RSS value increases and never goes down.
π‘ Expected behavior
Stable memory consumption for a server usage
π Details
π Environment
π Additional context
OpenSSL has been compiled from https://www.openssl.org/source/openssl-3.0.13.tar.gz without any special option (except install prefix)
Python has been compiled from source https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz with following options
If you need more information or if I can help anyway tell me
The text was updated successfully, but these errors were encountered: