Plesk

High CPU utilization by Fail2ban on Plesk server

Symptoms

Cause

Large size of the /var/log/secure file.

Resolution

  1. Log in to Plesk.

  2. Disable ssh jail in Tools & Settings > IP Address Banning (Fail2Ban) > Jails.

  3. Wait until the completion of Daily Maintenance task, i.e. the output of the following command is empty:

    # ps -auxwf | grep daily | grep -v grep

  4. Execute the command below to rotate syslog files:

    On CentOS/RHEL-based distributions:

    # logrotate -f /etc/logrotate.d/syslog

    On Debian/Ubuntu-based distributions:

    # logrotate -f /etc/logrotate.d/rsyslog

  5. Enable ssh jail in Tools & Settings > IP Address Banning (Fail2Ban) > Jails

  6. Check the CPU usage of fail2ban service:

    # top

Exit mobile version