Author surkamp
Recipients rpetrov, surkamp, vstinner
Date 2008-10-24.12:48:15
SpamBayes Score 6.43751e-09
Marked as misclassified No
Message-id <1224852498.06.0.401252645386.issue4177@psf.upfronthosting.co.za>
In-reply-to
Content
> 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).

The original text block is about 5 to 9 Mbytes - its a server generated
report by pflogsum. When it came to our mailing list processing program
(wrote by someone else in Python), it freezes building the MIMEText
object. Actually no MemoryError isn't raised, just a sudden freeze of
the running thread.

Unfortunately the test script submited does not do the same behavior,
maybe some other things are freezing the software instead of raise the
MemoryError. I have checked for blocks of try: ... except ...: pass that
could hide the problem, but found nothing.

I have already limited the size on Postfix, but the strange thing is why
this happens on FreeBSD and don't on Linux.
History
Date User Action Args
2008-10-24 12:48:18surkampsetrecipients: + surkamp, vstinner, rpetrov
2008-10-24 12:48:18surkampsetmessageid: <1224852498.06.0.401252645386.issue4177@psf.upfronthosting.co.za>
2008-10-24 12:48:15surkamplinkissue4177 messages
2008-10-24 12:48:15surkampcreate