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: HTTPConnection memory leak
Type: Stage:
Components: Library (Lib) Versions: Python 2.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jhylton, mmoales, nnorwitz
Priority: normal Keywords:

Created on 2002-08-22 14:37 by mmoales, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Messages (8)
msg12096 - (view) Author: Mark Moales (mmoales) Date: 2002-08-22 14:37
This may be related to bugs 559117 and 592645.

I am using Python 2.2.1 (#34, 4/9/2002) on Windows 
2000 (5.00.2195, Service Pack 2).  Similar to bug 
559117, I see a steady increase of 4K in the size of the 
process after every 10 seconds or so.  Here's my test 
script:

import httplib
import time

for i in range(1000):
    conn = httplib.HTTPConnection("www.python.org")
    conn.request("GET", "/index.html")
    r1 = conn.getresponse()
    time.sleep(0.5)
    conn.close()


msg12097 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-09-01 22:42
Logged In: YES 
user_id=33168

I can't duplicate this problem on Linux.  I used valgrind
too.  It's possible this problem was fixed.  

Mark, can you build the version from CVS and see if you
still have the problem?  I think there was a memory leak in
this area, but I'm not sure if it effected windows.  I
cannot test on windows.
msg12098 - (view) Author: Mark Moales (mmoales) Date: 2002-09-03 14:02
Logged In: YES 
user_id=565165

I built the debug and release versions of 2.2.1 on Windows and still see the problem with both.  I have not had any 
success building 2.3 on Windows.  When I try to build 2.3, I get errors in tokenizer.c.

Just so you know, I have not been able to duplicate the problem on Linux.
msg12099 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2002-09-03 16:29
Logged In: YES 
user_id=33168

Tim apparently fixed this problem in 2.3, at least he fixed
a problem. :-)

Could you test w/2.3 and/or 2.2.1+ (do a cvs upd -r
release22-maint)?  2.2.1+ has bug fixes that will be rolled
into 2.2.2.
msg12100 - (view) Author: Mark Moales (mmoales) Date: 2002-09-03 17:54
Logged In: YES 
user_id=565165

I was able to get 2.3 to build (with the latest stuff from CVS) 
and the problem seems to be fixed.  I'll try and update 2.2.1 
when I have some time and test that.  Thanks!
msg12101 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-10-11 17:20
Logged In: YES 
user_id=31392

Doesn't look like this is still a problem, but waiting to
close until we hear for certain.
msg12102 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-08 01:05
Logged In: YES 
user_id=33168

Mark, are you still having problems with 2.2.2 or can we
close this bug?
msg12103 - (view) Author: Mark Moales (mmoales) Date: 2003-01-08 15:36
Logged In: YES 
user_id=565165

Go ahead and close the bug because it appears to be fixed in 2.2.2.  Sorry for not following up on 
this sooner.

Thanks.
History
Date User Action Args
2022-04-10 16:05:36adminsetgithub: 37071
2002-08-22 14:37:53mmoalescreate