[exim] Re: Exim 4.52 and SA 3.0.4 memory problem

Top Page
Delete this message
Reply to this message
Author: Gordon Ross
Date:  
To: exim-users
Subject: [exim] Re: Exim 4.52 and SA 3.0.4 memory problem
Why do you include the "condition = ${if <{$message_size}{500k}{1}{0}}" twice ?

GTG

>>> <Wolfgang.Fuertbauer@???> 11/08/2005 16:26:50 >>>

I had the same problem: the fault was in the configuration file:
take care that the 'condition' statement is before the 'spam' statement
otherwise EVERY mail well be send to spamd and hat consumes LOTS of
memory and CPU

 warn  message = X-Spam-Score: $spam_score ($spam_bar)
              condition = ${if <{$message_size}{500k}{1}{0}}
              spam = exim:true
    warn  message = X-Spam-Report: $spam_report
              condition = ${if >{$spam_score_int}{40}{1}{0}}
              spam = exim:true
  # Add X-Spam-Flag if spam is over system-wide threshold
    warn message = X-Spam-Flag: YES
          condition = ${if <{$message_size}{500k}{1}{0}}
          spam = exim


  # Reject spam messages with score over 5, using an extra condition.
    deny  message = SPAM This message scored $spam_score SPAM points.
          condition = ${if >{$spam_score_int}{50}{1}{0}}
          spam = exim:true


hope that helps
Wolfgang

>Greetings list,
>
>following system is behaving very strange:
>
>RH Enterprise Linux 4
>Exim 4.52
>SA 3.0.4
>
>After upgrading exim from 4.43 to 4.52 today, the memory usage
>from _SpamAssassin_ skyrocketed. And it skyrocketed that much
>and so fast that I had to do a hardware-reboot after like 1 hour.
>Mind you, that machine has 2 Gig physical and 4 Gig swap ram.
>
>I was barely able to get a ps axu to see that all of my 25 spamd
>instances were hogging around 500mb ram each. Sadly the kernel
>started to kill random applications to free memory then and I lost the
>machine.
>
>I have now reduced the spamd instances to 10 on all servers to
>reduce the chance of the system running out of memory, but that
>shouldn't be an issue normally since they are well suited for
>their job.
>
>With exim 4.43 this behaviour does not occur.
>
>Top from another mx with the same setup, but still running exim 4.43:
>
> PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
>19462 root      16   0 53072  46m 2940 S  0.0  2.3   0:02.26 spamd
>19463 root      16   0 48056  41m 2940 S  0.0  2.1   0:01.67 spamd
>19466 root      16   0 39520  33m 2940 S  0.0  1.6   0:01.95 spamd
>19471 root      17   0 34880  28m 2940 S  0.0  1.4   0:01.61 spamd
>19465 root      16   0 33424  27m 2944 S  0.0  1.4   0:01.27 spamd
>19469 root      17   0 33232  27m 2940 S  0.0  1.3   0:01.31 spamd
>19468 root      17   0 32540  26m 2932 S  0.0  1.3   0:00.78 spamd
>19470 root      16   0 32488  26m 2932 S  0.0  1.3   0:00.65 spamd
>19464 root      17   0 32476  26m 2940 S  0.0  1.3   0:01.06 spamd
>19467 root      16   0 32296  26m 2932 S  0.0  1.3   0:00.55 spamd
>19458 root      25   0 31152  25m 2856 S  0.0  1.2   0:00.48 spamd


Top from the today updated mx with exim 4.52 (freshly restarted
spamassassin and exim like 30 minutes ago):

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3386 root      16   0  189m 184m 2944 S  0.0  9.1   0:07.24 spamd
 3384 root      16   0 69480  63m 2944 S  0.0  3.1   0:03.69 spamd
 3387 root      16   0 51984  46m 2944 S  0.0  2.3   0:02.89 spamd
 3381 root      16   0 45404  39m 2944 S  0.0  2.0   0:03.83 spamd
 3383 root      16   0 45300  39m 2948 S  0.0  2.0   0:06.71 spamd
 3382 root      17   0 42120  36m 2944 S  0.0  1.8   0:03.06 spamd
 3380 root      16   0 35788  30m 2948 S  0.0  1.5   0:02.61 spamd
 3389 root      16   0 35700  30m 2944 S  0.0  1.5   0:01.81 spamd
 3385 root      17   0 35464  30m 2940 S  0.0  1.5   0:02.19 spamd
 3388 root      16   0 33660  28m 2944 S  0.0  1.4   0:01.99 spamd
 3375 root      25   0 30332  25m 2860 S  0.0  1.2   0:00.46 spamd


As you can see, spamd is already starting to hog memory again.
There are no current tcp connections from exim to spamd at that
very moment, so it can't result from a hanging tcp-session.

I have no clue who to blame and where to actually start searching
for the problem. I know that SpamAssassin is the memory hog,
but obviously, for some strange reason, exim seems to trigger
that problem.

Does anyone have a hint where to start digging?

sash

--------------------------------------------------
Sascha Runschke
Netzwerk Administration
IT-Services

ABIT AG
Robert-Bosch-Str. 1
40668 Meerbusch

----------------------------------------------------------------------
Wolfgang Fuertbauer (e-Mail: Wolfgang.Fuertbauer@???)
EBEWE Pharma
Mondseestrasse 11
4866 Unterach, Austria
Tel +43 7665 8123 315
Fax +43 7665 8123 11
http://www.ebewe.com
--
## List details at http://www.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/