My experience is that if rsyslog does not stop "quickly", then it is trying to do something like write to a queue file or terminate connectivity with a "slow" network partner.  If you can figure out what it's trying to do you'll be halfway to solving the issue.

https://serverfault.com/questions/776732/how-long-do-daemons-have-to-exit-when-the-server-shutdown-signal-is-received

The systemd service file is simple, this one from a server with multiple instances of rsyslog...

[Unit]
Description=rsyslog-nydfs_debug
Documentation=man:rsyslogd(8)
Documentation=https://www.rsyslog.com/doc/
After=network.target centrifydc.service

[Service]
Type=notify
User=loggingshare
Group=loggingshare
EnvironmentFile=-/nydfs/rsyslog/nydfs_debug/config/rsyslog.env
ExecStart=/usr/sbin/rsyslogd -n -f /nydfs/rsyslog/nydfs_debug/rsyslog.conf -i /nydfs/rsyslog/nydfs_debug/rsyslog.pid $SYSLOGD_OPTIONS
UMask=0066
StandardOutput=null
Restart=on-failure

# Increase the default a bit in order to allow many simultaneous
# files to be monitored, we might need a lot of fds.
LimitNOFILE=2048

[Install]
WantedBy=multi-user.target



Regards,



On 3/10/20 9:05 AM, pedro.m.reis via rsyslog wrote:
Hi all

What is the correct way to stop the rsyslog daemon without message loss?
I'm having trouble to stop it via systemd, it takes forever and then the
process is killed.
Cann you provide a sample systemd unit file? Or point me to a
thread/web/etc.

Thanks

Pedro



--
Sent from: http://rsyslog-users.1305293.n2.nabble.com/
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.


_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to