Sérgio Surkamp <[EMAIL PROTECTED]> added the comment: > 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. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4177> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com