Bugs item #1296004, was opened at 2005-09-20 07:14 Message generated for change (Comment added) made by birkenfeld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1296004&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Yue Zhang (yuezhang) Assigned to: Nobody/Anonymous (nobody) Summary: MemoryError in httplib Initial Comment: The problem from http://www.thescripts.com/forum/thread25490.html can be repeated here with python2.4.1 on WinXP. Test sample: sending about 5MB http data. It appears to be caused by line 545, httplib.py. chunk = self.fp.read(amt) It seems that reading too much from that sock causes leak. Thus trying to edit the line making it chunk = self.fp.read(min(amt,50000)) the problem will be solved. //Not sure whether it was sock error for using pure sock for http won't cause this problem. If you need an example of this bug, please contact me. Also, the method in httplib is using string concatenation, which might turn slow when the strings are large. An alternative is using a temp list to cache the string sections, and join the list at last. This will be faster, with the draw back of some more memory usage. Best regards, Zhang Yue ---------------------------------------------------------------------- >Comment By: Reinhold Birkenfeld (birkenfeld) Date: 2005-09-29 22:16 Message: Logged In: YES user_id=1188172 I added a "max amount" of 1 MB in httplib.py r1.96, 1.94.2.2. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1296004&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com