ERPNext Conference 2019* ERPNext.com Blog

Request time out Error - Site running very slow


#1

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


#2

Thats generally because of unrotated logs.


#3

Thank you Vamyip.
this is my logrotate file:

/var/log/fail2ban.log {

weekly
rotate 4
compress

delaycompress
missingok
postrotate
    fail2ban-client flushlogs 1>/dev/null || true
endscript

# 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?
Regards,


#4

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.


#5

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


#6

Hi,
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
Nofal


After Certbot https, ERPNext is too slow
#7

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
    postrotate
    fail2ban-client flushlogs 1>/dev/null || true
    endscript