I’m running few websites on my droplet (8G, 4vcpu) and one of my websites causing extremely high CPU usage (it has only a few simultaneaus visitor). MySql is guilty, accoring to htop. When I turn off this website, everything goes back to normal. I have tried everything to identify the issue, but it comes back time-to-time (sometimes it is good for weeks, then the high CPU load comes back. High = 100% always, according to the DO draphs.)
I have tried SHOW PROCESSLIST; but I cant see too much connections, or slow queries (basically the site is fast, most of the times, but not always!) i have tried to play with my.cnf, one of my friends fine-tuned it, then it was good for few weeks, then since a few days the graph touched the ceiling again.
I’m using cloudflare and a bit suspicious that It I see very high bandwidth usage and high Traffic (users, crawler bots, threats included) (High = compared to my other sites which has much more traffic (measured by Google Analytics). I cant see uncommon number in the number of threats. I’ve tried to turn on the Cloudflare “im under attack” mode, but the cpu usage is the same.
Any suggestions ? should I copy my.cnf here ? I have a feeling that I will find the answer somewhere else.
Thank you guys for the help !!!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.