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.

Author vstinner
Recipients rpetrov, surkamp, vstinner
Date 2008-10-24.11:27:20
SpamBayes Score 3.920037e-09
Marked as misclassified No
Message-id <1224847642.01.0.454999889275.issue4177@psf.upfronthosting.co.za>
In-reply-to
Content
Your example work here on:
 - Linux, i386, 2 Go of memory, Python 2.5
 - FreeBSD in Qemu, i386, 512 MB of memory, Python 2.5

> The program just eat all the CPU and with high memory usage or raise 
a MemoryError

Yes, it takes one minute or more to finish. If there is not enough 
memory, Python raises a MemoryError. The behaviour is correct: Python 
doesn't crash, it's just slow.

Your text file is ~40 MB. Python may allocate mutiple objects bigger 
than 40 MB to create the email content. The algorithm should be 
changed to work on a stream (process small chunks, eg. 4 KB) instead 
of manipule the full text in memory (+40,000 KB).

Why do you try to send 40 MB by email? Use FTP or another protocol :-p 
Or use another encoding (base64) to attach the text to the email.
History
Date User Action Args
2008-10-24 11:27:22vstinnersetrecipients: + vstinner, rpetrov, surkamp
2008-10-24 11:27:22vstinnersetmessageid: <1224847642.01.0.454999889275.issue4177@psf.upfronthosting.co.za>
2008-10-24 11:27:20vstinnerlinkissue4177 messages
2008-10-24 11:27:20vstinnercreate