packages
packages copied to clipboard
syslog-ng: fix OOM issues by adding support for logrotate
Maintainer: @BKPepe Compile tested: glinet-b1300, turris-omnia, 19.07, 22.03 Run tested: glinet-b1300, turris-omnia, 19.07, 22.03
Description:
With heavy system logging which goes by default into /var/log/messages
log file which is usually placed in tmpfs/RAM one can trigger OOM killer
fairly easily, thus killing random processes and in some cases making
system unusable.
This is likely happening due to the fact, that Linux by default uses 1/2 of available RAM for tmpfs, which might be for example an issue on low RAM devices with ath10k wireless.
So let's fix it by adding logrotate functionality which should limit the
size of /var/log/messages
log file to 1M by default, but could be
tweaked by config knob if needed be.
In Turris OS, we have similar approach as you did.
It's 404 here:
$ curl https://github.com/openwrt/packages/pull/2c617bbe224ab2e6878e86c5cd61dbfa59440500
Not found
And that referenced commit 2c617bbe is likely wrong target as well.
And that referenced commit 2c617bb is likely wrong target as well.
Oops! My bad. This is the correct link - https://gitlab.nic.cz/turris/os/build/-/blob/5a54ac10f3c4d066848eee472d17e302574a301c/patches/packages/to-upstream/0014-syslog-ng-rotate-default-log-with-logrotate.patch I will edit it in the previous comment.
Thank you for your contribution! :+1: