-
-
Notifications
You must be signed in to change notification settings - Fork 99
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?
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
Steps to reproduce the behavior:
-
Run this server:
from cheroot.wsgi import WSGIServer from cheroot.server import get_ssl_adapter_class def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Content-type','text/plain')] start_response(status, response_headers) return [b'Hello world!'] addr = '0.0.0.0', 8078 ssl_cert='/etc/shinken/certs/server.cert' ssl_key='/etc/shinken/certs/server.key' server = WSGIServer(addr, my_crazy_app) server.ssl_adapter = get_ssl_adapter_class()(certificate=ssl_cert, private_key=ssl_key) server.start()
-
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
- Cheroot version: 10.0.0
- Python version: 3.11.8 / 3.11.6 / 3.11.5
- OpenSSL version: 3.0.12 / 3.0.13
- OS: CentOS 7 / Redhat 8.9 / Alma 8.9
- Browser: any
π 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
./configure --prefix=/opt/shinken/python311 --enable-optimizations --with-openssl=/opt/shinken/openssl/ --with-openssl-rpath=/opt/shinken/openssl/lib64 --with-ssl-default-suites=openssl --without-static-libpython --disable-test-modules --enable-shared LDFLAGS="-L/opt/shinken/openssl/lib64 -Wl,-rpath=/opt/shinken/python311/lib"
If you need more information or if I can help anyway tell me