Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
Ubuntu 22.04
python 3.12, python3.11
importsslimportsocketimporttimehost='192.168.16.66'# some server we can connect with https as exampleport=443session=Nonecontext=ssl._create_unverified_context(protocol=ssl.PROTOCOL_TLSv1_2)withsocket.create_connection((host,port))assock:withcontext.wrap_socket(sock,server_hostname=host,session=session)asssock:foriinrange(300000):session=ssock.sessionprint('Sleeping')time.sleep(200)
Here is part of script that is used for "ssl reuse" session during connection to server
Running this script brings to memory leak (process memory increased from 322Mb to 2.5Gb).
Memory is not freed on "time.sleep" instruction
Not reproduced on python 3.8
CPython versions tested on:
3.11, 3.12
Operating systems tested on:
Linux