'DelayLA'' ''''


Add one second SMTP sleep on high load V8.12 and later

When the load average on a machine (the average number of processes in the run queue over the last minute) becomes too high, sendmail can compensate in three different ways:

  • The QueueLA option (QueueLA) determines the load at which sendmail will begin to queue messages rather than delivering them, and at which it will skip any scheduled queue runs, and the load at which scheduled runs will be skipped.

  • The RefuseLA option (RefuseLA) determines the load at which sendmail will begin to refuse connections rather than accepting them.

  • The DelayLA option (DelayLA) determines the load at which sendmail will begin to delay replies to SMTP commands.

The forms of the DelayLA option are as follows:

O DelayLA=load             configuration file (V8.12 and later) 
-ODelayLA=load             command line (V8.12 and later) 
define(`confDELAY_LA',load)    mc configuration (V8.12 and later) 

The optional argument load, of type numeric, defaults to zero if it is missing. If the entire DelayLA option is missing, the default value given to load is zero. The default for the mc technique is to omit this option.

This DelayLA option is effective only if your sendmail binary was compiled with load-average support (LA_TYPE), which is almost universal these days. You can use the -d3.1 debugging switch to discover whether your binary includes the necessary support.

Should the load on the machine reach or exceed the limit, sendmail will begin to impose a delay on each received SMTP command (commands received by a listening daemon). When an SMTP command arrives, sendmail will sleep one second before processing it:

RCPT To: <user@your.domain>
  sleep one second here

When the limit is first met or exceeded, the following message will be logged:

delaying connections on daemon name: load average=load >= limit  

Here, name is the name given to the port that is handling the connection. That name is set with the DaemonPortOptions option (DaemonPortOptions) Name= equate.

The load is the current load average, and the limit is the limit set by this option. This message is logged only once, and then again each 90 seconds for as long as the high load condition persists.

The sleep of one second, and the logging interval of 90 seconds, are both hardcoded in the source and cannot be changed.

The DelayLA option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges.

    Part I: Build and Install
    Part II: Administration
    Part III: The Configuration File
    Chapter 21. The D (Define a Macro) Configuration Command
    Chapter 24. The O (Options) Configuration Command