MemoryError on reading mbox file

Christoph Krammer redtiger84 at googlemail.com
Wed Sep 12 10:18:21 EDT 2007


On 12 Sep., 12:20, David <wizza... at gmail.com> wrote:
> It may be that Python's garbage collection isn't keeping up with your app.
>
> You could try periodically forcing it to run. eg:
>
> import gc
> gc.collect()

I tried this, but the problem is not solved. When invoking the garbage
collection after every loop run, the amount of memory indicated by top
stays the same for a very long time until at some point (at different
messages), while it is executing the loop header, the memory increases
until it hits 100% and swap hit also 100% => MemoryError

Can there be a problem within the mailbox module while processing too
large files?

Regards,
 Christoph





More information about the Python-list mailing list