[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim / amavis-ng overload



David Fokkema wrote:
Many, many mails were downloaded (thanks to this fine group, :-) and
almost immediately, my server became irresponsive. I managed to squeeze
in and run top which came on after three minutes and saw my load
increase from 20 to 30 to 50 to 77.81. I had a few exim processes and
_lots_ of amavis processes running. My server started killing processes
(out of memory) and I decided to power down (using the button, nothing
else worked).

I had a similar problem not long ago after upgrading spamassassin and going on holiday.

1. What can I do when my server overloads like this? Logging in was
   _very_ difficult or not possible (timeout of 60 seconds on login
   prompt...)

Not sure about this one, I don't recall what I did in my panic :-( Probably killed fetchmail and waited it out.

2. How do I limit the number of exim processes? Exim is run from inetd
   and the infopages showed me that smtp_accept_max will not work. Is
   this indeed a problem? Should I run exim as a separate daemon and
   enable smtp_accept_max (or keep it at default 20, better than no
   limit...)? Is every server which runs exim from inetd vulnerable to
   this (whether deliberate or not) DoS attack?

The solution (which I found after googling around for a while) is to add the following settings in your exim.conf file:

# When this option is set, no message deliveries are ever done if the
# system load average is greater than its value, except for deliveries
# forced with the -M option. If deliver_queue_load_max is not set and
# the load gets this high during a queue run, the run is abandoned.
# There are some operating systems for which Exim cannot determine the
# load average (see chapter 1); for these this option has no effect.

deliver_load_max = 4

# If the system load average is higher than this value, all incoming
# messages are queued, and no automatic deliveries are started. If this
# happens during local or remote SMTP input, all subsequent messages on
# the same connection are queued. Deliveries will subsequently be
# performed by queue running processes, unless the load is higher than
# deliver_load_max.
# There are some operating systems for which Exim cannot determine the
# load average (see chapter 1); for these this option has no effect. See
# also smtp_accept_queue and smtp_load_reserve.

queue_only_load = 4

Randy




Reply to: