Warning: sendmail stops sending when load is high

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Warning: sendmail stops sending when load is high

Post by gormank »

This isn't a problem that needs support. Just FYI...

It seems sendmail has features that queue or disable sending mail if load gets high on the server. It seems it starts queuing mail when load (top, uptime) gets to 8 and refuses to send at 12. The defaults seem to match the commented lines in the .cf. Here's a message from maillog:

rejecting connections on daemon MTA: load average: 15

# grep eLA /etc/mail/sendmail.cf
#O QueueLA=8
#O RefuseLA=12

We had a bunch of servers down last night and for some reason that seems to have made Nagios repeatedly check to the point load got out of hand. Any suggestions for limiting repeated checks so this doesn't happen? I reduced the number of retries so that may take care of it.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Warning: sendmail stops sending when load is high

Post by rkennedy »

The retries should take care of it, as well as modifying the two variables you mentioned in the sendmail.cf.

Code: Select all

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12
Former Nagios Employee
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Warning: sendmail stops sending when load is high

Post by gormank »

There won't be any retries from Nagios and until the load drops, sendmail just keeps refusing to send mail.
This was more an info post in case others see the issue, or developers decide to reconfigure sendmail as part of the installation.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Warning: sendmail stops sending when load is high

Post by tmcdonald »

When you say Nagios would repeatedly retry when sendmail queued/refused to send, hoq quickly was it re-checking? Was it respecting the retry_interval setting? I can't think of anything that would cause it to act otherwise.

Regarding setting the defaults, we could possibly do that but I think it would be better to treat this in the same way as NPCD in that we recommend setting it to some fixed multiple of the number of cores in the system. Thoughts?
Former Nagios employee
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Warning: sendmail stops sending when load is high

Post by gormank »

Nagios sent the notification to sendmail and is done with it, so Nagios isn't going to retry. The notifications are visible in Nagios under home, notifications.
The first time I ran into this issue was when I checked the system after not getting notified. Probably not the best way to find out. I know of no Nagios docs that say to adjust sendmail settings.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Warning: sendmail stops sending when load is high

Post by rkennedy »

Thanks for letting us know. In your environment, have you modified the two variables above according to the amount of cores you have?
Former Nagios Employee
Locked