Try ERPNext Buy Support Partners Foundation

Request time out Error - Site running very slow

I am getting Request Time Out error while performing any action.I have found file2ban utilizing my 100% CPU. Kindly Help

Thats generally because of unrotated logs.

1 Like

Thank you Vamyip.
this is my logrotate file:

/var/log/fail2ban.log {

rotate 4

    fail2ban-client flushlogs 1>/dev/null || true

# If fail2ban runs as non-root it still needs to have write access
# to logfiles.
# create 640 fail2ban adm
create 640 root adm


is this is the reason for slow performance of my site?

No. Fail2Ban reads logs configured in for jails (generally nginx and ssh) to identify anomalous traffic. If logs of nginx and ssh are not rotated, they become large and fail2ban takes longer to read those logs.

First verify if any of logs are being rotated. If yes, then need to check why nginx’s logs are not rotated.

1 Like

Thank You VamYip,
System is responding normally after clear my log files.
Thanks for your support.

Can you elaborate more, I have facing same issue, but how to verify this point first, plz detailed steps

then second part also I need a how to steps for that

Thanks a lot

Manually deleted all older logs from system.

  1. cd /home/var/log
  2. ls -lah
  3. find the large size file and clear the content with sudo echo > file name
  4. cd ~/frappe-bench/logs
  5. repeat no 3 (for all .log file)
    Add the below line inside
  6. cd etc/logrotate.d/
  7. sudo nano fail2ban
  8. add this line inside postrotate block
    fail2ban-client flushlogs 1>/dev/null || true
1 Like