[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Load-average based SMTP receiver blocking ?
When the load got too high, sendmail 8.6.8 and earlier used to set the
listen queue of the listen-socket to zero. This would cause incoming
connections to get connection refused. When the load went back down,
it would set the listen queue back up to five.
In version 8.6.9, this was changed so that sendmail would close the
listen socket when the load got too high and re-create it when the
load dropped again. This was apparently done because some systems
apparently botched their handling of a zero listen backlog.
Unfortunately, with the socket interface, you can't get the address of
the client without accepting the connection. By the protocol, once
you accept the connection, you have to send a 220 or a 421 reply.
Refusing incoming connections is a relatively drastic measure, and
should only be done if the load is really pegged high. If the load is
only moderately high, you want to instead cut back on processing
outgoing mail. Sendmail has a sliding load limit--after going over a
lower load limit, it stops processing low-priority outgoing mail.
Priority is a weighted function of number of previous delivery
attempts, number of recipients, size of the message, and enqueue time;
larger values of the previous values lessen the chance of the message
being processed. As load goes up, less mail qualifies for processing.
After the load goes over a higher threshold, it stops handling
_.John G. Myers Internet: jgm+@CMU.EDU