[Python-bugs-list] [ python-Bugs-559117 ] HTTPSConnection memory leakage

noreply@sourceforge.net noreply@sourceforge.net
Tue, 02 Jul 2002 13:48:58 -0700


Bugs item #559117, was opened at 2002-05-22 11:09
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=559117&group_id=5470

Category: Python Library
Group: Python 2.1.2
>Status: Closed
>Resolution: Fixed
Priority: 3
Submitted By: Paolo Andreetto (pandreetto)
Assigned to: Jeremy Hylton (jhylton)
Summary: HTTPSConnection memory leakage

Initial Comment:
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.


----------------------------------------------------------------------

>Comment By: Jeremy Hylton (jhylton)
Date: 2002-07-02 20:48

Message:
Logged In: YES 
user_id=31392

Fixed on 2.1 maintenace branch.  It's there if we ever do a
2.1.4 release.


----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2002-06-27 03:55

Message:
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.


----------------------------------------------------------------------

Comment By: Jeremy Hylton (jhylton)
Date: 2002-06-06 15:25

Message:
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.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=559117&group_id=5470