Articles in this section

Messages are missing from the system logs: messages lost due to rate-limiting

Plesk for Linux kb: technical

Symptoms

  • Some messages are missing in /var/log/messages, /var/log/maillog or any other log files.
  • The following message can be found in /var/log/messages:

PLESK_INFO: server rsyslogd: imjournal: X messages lost due to rate-limiting

Cause

The systemd journal and/or rsyslogd have rate-limiting enabled. When a process generates log messages faster than the configured threshold, messages exceeding the limit are dropped. This results in missing log entries and the "messages lost due to rate-limiting" warning.

Resolution

To resolve this, one needs to disablve rate-limiting, which can be done through the following steps:

  1. Connect to the server via SSH
  2. Execute the command below:

# pidof systemd && echo "systemd" || echo "other"

 - Follow the steps "for systemd" in case the output is:

PLESK_INFO: 1
systemd

 - Else, follow the steps "for sysvinit"

for systemd

1. Using the vi text editor open the /etc/systemd/journald.conf file.

2. Edit or add the following lines:

CONFIG_TEXT: # Disable rate-limiting of log entries
RateLimitInterval=0
RateLimitBurst=0

3. Open /etc/rsyslog.conf file and remove the rsyslog rate-limiting in the as follows:

CONFIG_TEXT: $imjournalRatelimitInterval 0
$imjournalRatelimitBurst 0

4. Restart rsyslog and systemd-journald services:

# systemctl restart rsyslog
# systemctl restart systemd-journald

for sysvit

1. Edit /etc/rsyslog.conf file and edit or add the following lines: 

CONFIG_TEXT: # Disable rate-limiting of log entries 
$SystemLogRateLimitInterval 0 
$SystemLogRateLimitBurst 0

2. Restart rsyslog service:

# service rsyslog restart

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.