I am hosting on linode 4 CPU and 8 GB RAM. I have hosted two websites
Main Domain
Subdomain
Subdomain is working fine as it has less traffic.
Main Domain has high traffic its working only when I restart the system. after few hours it gives 524 error.
First I thought MySQL is overloaded, but upon checking the details, it is not.
Currently CPU Usage - approx. 50%, RAM usage 20-30%, Disk Usage: 50%
Please help How to proceed.
Error 524 is cloudflare specific issue caused by server processes that operate for a relatively extended period of time which in turn makes cf fail to connect to the server. Cloudflare has a timeout of maximum 100 seconds for certain plans i believe any plans below business plan.
Solution:
Install htop through terminal
apt-get install htop || yum install htop || wget https://github.com/htop-dev/htop/releases/download/3.2.1/htop-3.2.1.tar.xz && unxz htop-3.2.1.tar.xz && tar -zxvf htop-3.2.1.tar.gz && cd htop && ./configure && make && make install
Reboot your server and open htop using command htop and look out for memory usage indicated by Mem% and respective process e.g. see highlighted mysqld process in light blue
Hi, thanks for the suggestion.
I couldn’t be active in recent days. But the main cultprit was MySQL.
One of the bug was causing 100k data to be inserted each 10 minutes. Table had reached to 10 million rows. So whenever some data was to be fetched from the same table, It would hang the server.