[Mimedefang] slave ran out of memory

David F. Skoll dfs at roaringpenguin.com
Thu Mar 11 12:59:23 EST 2004


On Thu, 11 Mar 2004, Paul Murphy wrote:

> I'm not entirely clear on when Perl incurs memory use in the object-oriented
> model, but the worst case (and most probable approach) is that as soon as you
> refer to an object, it is extracted and held in memory until the object is
> finished with.  Since there is no way to explicitly inform Perl that you've
> finished with the memory, it stays allocated but unused.

Perl uses a reference count model, so when the last reference to a
"thingy" (that's the official Perl term -- no kidding) goes away, the
thingy is deallocated.

It is possible to create circular data structures whose reference counts
never drop to zero, even though the thingies are unreachable.  That's
why the multiplexor kills off slaves after a certain number of requests.

I'm pretty aggressive about limiting message sizes.  I used to limit
them to 1MB, but (alas) that became impractical, so I grudgingly bumped
the limit up to 10MB.

Regards,

David.



More information about the MIMEDefang mailing list