This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: HTTPSConnection memory leakage
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jhylton Nosy List: jhylton, pandreetto
Priority: low Keywords:

Created on 2002-05-22 11:09 by pandreetto, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (4)
msg10901 - (view) Author: Paolo Andreetto (pandreetto) Date: 2002-05-22 11:09
I've tried this test script:

import time,httplib,gc

gc.set_debug(gc.DEBUG_STATS)

while 1:
	conn=httplib.HTTPSConnection('<myhostip>')
	conn.connect()
	conn.request('GET', '/index.html')
	res=conn.getresponse()
	conn.close()
	time.sleep(1)
	print gc.collect()

and I've seen that a memory leakage occurs. The process
requires 4Kbytes every 10 seconds. The output of
garbage collector shows that at the end of each cycle a
new object is contained into last generation.
I've tried also to remove from the script both the
conn.request and the conn.getresponse but nothing has
changed; perhaps the problem is in the connect() method.
All tests run on linux (debian distribution, sid
version for i386) with kernel 2.4.18 and python 2.1.3.
The web server is apache with mod-ssl on redhat 7.2.
msg10902 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-06-06 15:25
Logged In: YES 
user_id=31392

Several leaks were fixed just before Python 2.2b1.  It looks
like those changes were not backported to the 2.1
maintenance branch.  I don't have time to backport the
changes, but I'd be happy to review a patch.  Since the
problem wouldn't get fix until a (hypothetical) 2.1.4, you
might get more mileage out of an upgrade to 2.2.
msg10903 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-06-27 03:55
Logged In: YES 
user_id=31392

Some of the SSL fixes should back reported to 2.1, if we 
ever to a 2.1.4 release.
msg10904 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-07-02 20:48
Logged In: YES 
user_id=31392

Fixed on 2.1 maintenace branch.  It's there if we ever do a
2.1.4 release.
History
Date User Action Args
2022-04-10 16:05:20adminsetgithub: 36634
2002-05-22 11:09:54pandreettocreate