Re: [Exim] Memory usage

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Hubbard, Matt
CC: 'exim-users@exim.org'
Subject: Re: [Exim] Memory usage
On Mon, 20 May 2002, Hubbard, Matt wrote:

> I was wondering, how much memory is taken up with each "RCPT TO" during an
> incoming SMTP transaction?


Depends on what you have configured in the way of checking.

> A daemon process would fork to receive a message and then the memory usage
> would keep climbing until it used all available memory (~450MB mem + swap)
> and was killed by the kernel.


> It turned out to be someone trying to send a message to ~ 4500 recipients. I
> had thought there was a default cap on the number of recipients, but it
> turned out I'd misread the documentation getting max_rcpt and recipients_max
> confused.


Which release of Exim? Prior to Release 4.00, the code for handling
expansions such as $header_xxx: did this kind of thing when there were
large number of identically-named headers. That's why I asked what kind
of checking you have enabled.

This is the change that was made for 4.00:

 8. When Exim was building a dynamic string for $header_xxx from a number of
    headers of the same name, or for $message_headers, it was using the dynamic
    string function which is designed for use with relatively short strings. If
    a pathological message had an enormous header, it chewed up memory at a
    ridiculous rate. The code has been rewritten so that it does not do this.
    With a 64K header string (there's a limit set at 64K) it now just gets one
    64K buffer. Previously it used a large number of megabytes to build such a
    string, and some system filter processing ran machines into the ground on
    messages with huge headers.



--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.