HTTPS: memory leakage

Paolo Andreetto paolo at prosa.it
Thu Apr 18 05:52:41 EDT 2002


Hi

It seems to me that HTTPS support of python2.1 causes a memory
leakage, but I can't understand the source of such a problem.
With this code:

import time,httplib,sys
    while 1:
	conn=httplib.HTTPS('<webserver address>')
	conn.putrequest('GET', '/index.html')
	conn.putheader('Accept', 'text/html')
	conn.putheader('Accept', 'text/plain')
	conn.endheaders()
	errcode, errmsg, headers = conn.getreply()
	print errcode # Should be 200
	f = conn.getfile()
	data = f.read() # Get the raw HTML
	print len(data)
	f.close()
	conn.close()
	time.sleep(1)

every 10 seconds, in the average, the process requires 4Kbytes and
this trand seems to be unbreakable.
This test run on a i386 with a debian (sid) distro, with kernel 2.4.18
and python 2.1.3. The host contacted was a i386 with a RedHat 7.2
distro, with apache and mod_ssl as supplied by the distribution.
Does it depend on the code or is there any problem in the system?

Thanks
Paolo



More information about the Python-list mailing list