On Fri, 18 Dec 2009, Oleg M?rk wrote:

> Hello,
>
> I am running rsyslog 3.18.0 provided with Debian 5.0 (lenny/stable)
> using the default configuration + ommail configuration (see below).
> When SMTP server is not available (either dns name mistyped or network
> outage), running command
>       logger Pattern.something
> that should result in email being sent, hangs and almost everything
> else becomes unresponsive (cron, sshd).

rsyslog does do async queuing by default, but only up until the point 
where the queue is full. At that point it defaults to blocking until there 
is more space in the queue.

see 'Discarding Messages' on http://www.rsyslog.com/doc-queues.html for 
infor on how to set rsyslog to throw away messages when it runs out of 
space instead of blocking.

David Lang


> I do realize that it has something to do with lack of async queueing
> by default, but I don't understand why logging commands just hang
> seemingly forever.
> The configuration itself is as follows:
>       $ModLoad ommail
>       $template mailSubject,"RSYSLOG: %msg%"
>       $ActionMailSMTPServer smtp.server.com
>       $ActionMailFrom [email protected]
>       $ActionMailSubject mailSubject
>       $ActionMailEnableBody off
>       $ActionExecOnlyOnceEveryInterval 900
>
>       $ActionMailTo [email protected]
>       if $msg contains 'Pattern.' then :ommail:
>       .... # Quite many more such rules
>
> My aim is to have rsyslog configured so that when SMTP server is
> unavailable, corresponding mails just don't get delivered, and first
> of all to make sure the whole system does not hang/slow down because
> of this. As I have quite many actions sending emails I'd rather not
> configure per-action queue.
>
> For now I have resolved the problem by adding:
>       $WorkDirectory /var/log/queue
>       $MainMsgQueueType LinkedList
>       $MainMsgQueueFileName Main
>       $MainMsgQueueMaxDiskSpace 1g
>       $MainMsgQueueSaveOnShutdown on
> But I am not sure if this is the best solution and why there is a
> problem in the first place.
>
> Thanks!
> Oleg M?rk
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to