Dean Hamer Posted May 29 Posted May 29 Hi all, I was wondering if someone could help. Yesterday morning, around 2 a.m., my Invision installation started constantly hitting 100% CPU, which is obviously slowing down people browsing my community. My website idles typically around the 5%—10% CPU mark. I have disabled all applications, but the problem persists; I have a warning that my PHP is on version 8.0.30 and that my SQL is on non-InnoDB tables, which I am looking to rectify now. Is there anything else that could be causing this? Thanks, Dean
Dean Hamer Posted May 29 Author Posted May 29 Just to add, upon inspection at the WHM level, SQL is taking 65% of my CPU usage; I'm not sure if this is normal. I'm currently taking a full backup before upgrading PHP and moving to InnoDB tables.
Dean Hamer Posted May 29 Author Posted May 29 Could my issue be related to the following thread? I'm on version: 4.7.16
Marc Posted May 29 Posted May 29 In all honesty, I wouldnt jump to conclusions on a topic such as that. You are doing the correct thing at the moment with INNODB, which is actually the most likely to be causing you issues at this point
Dean Hamer Posted May 29 Author Posted May 29 I'm on the home straight and fixed most issues, anyone know what the latest version of PHP that is supported by incision? I can go up to 8.3
Stuart Silvester Posted May 29 Posted May 29 16 minutes ago, Dean Hamer said: I'm on the home straight and fixed most issues, anyone know what the latest version of PHP that is supported by incision? I can go up to 8.3 8.1 for v4.7.x Dean Hamer 1
Dean Hamer Posted May 29 Author Posted May 29 2 minutes ago, Stuart Silvester said: 8.1 for v4.7.x Last question, how do I prune the repeated log error? I know what the error is and have fixed but need to prune it from the logs.
Jim M Posted May 29 Posted May 29 9 minutes ago, Dean Hamer said: Last question, how do I prune the repeated log error? I know what the error is and have fixed but need to prune it from the logs. You can go to ACP -> Support -> System Log -> Prune Settings. It will automatically prune it based on the timeline there. Alternatively, if you have like hundreds of thousands of logs, you can truncate the core_log table. Be sure to take a backup prior to doing so if you do.
Dean Hamer Posted May 29 Author Posted May 29 Ok, I still have a slow website. 100% CPU utilisation. I have: Disabled all addons. Changed to InnoDb Changed to PHP version 8.1.28 Removed any old databases. Any suggestions?
Jim M Posted May 29 Posted May 29 Are there any more database suggestions in ACP -> Support? Could you please check your credentials on file and ensure that they are accurate (looks like you've provided display name instead of email which your site requires)?
Dean Hamer Posted May 29 Author Posted May 29 31 minutes ago, Jim M said: Are there any more database suggestions in ACP -> Support? Could you please check your credentials on file and ensure that they are accurate (looks like you've provided display name instead of email which your site requires)? Just some dangerous php functions enabled which I am currently disabling. I have updated my access details, let me know if you have any issues getting on. Thanks I've logged in to my vps shell and looked at what is the biggest load and it is showing as SQL I've all so rebooted my host.
Dean Hamer Posted May 29 Author Posted May 29 Interestingly, when I make the site offline, the CPU drops massively and back to normal and the site is quick and responsive, no issues. I turn it back on and grinds to a halt.
Dean Hamer Posted May 30 Author Posted May 30 So, I tested my theory, and I have found that the website works perfectly once I make it offline. When I make it online, it grinds to a halt, with the CPU hitting 100% consistently. I turned the site on around 8/9 p.m. last night, and it was 100% almost instantly. I set my alarm for 03:00 and turned it off, and the CPU immediately dropped to normal levels and stayed at that level throughout the morning. I will now make it online, see what processes are making it 100%, and post the results.
Marc Posted May 30 Posted May 30 You need to check with your hosting provider to see what is using the CPU. If its sql (I suspect it will be) then you need to see what exactly is running. Adding slow query logging may help you to ascertain this
Dean Hamer Posted May 30 Author Posted May 30 3 minutes ago, Marc Stridgen said: You need to check with your hosting provider to see what is using the CPU. If its sql (I suspect it will be) then you need to see what exactly is running. Adding slow query logging may help you to ascertain this This is currently what is running before I go online.
Dean Hamer Posted May 30 Author Posted May 30 (edited) As expected, turning the site online, the CPU has now gone back up to around 100%. Interestingly, I'm not sure that SQL is the issue; the first screenshot below shows the CPU usage going up. The image below shows the processes that are taking up the CPU usage: /opt/cpanel/ea-php81/root/usr/bin/php-cgi /home/USERNAME/public_html/index.phpInterestingly, I don't think this is SQL related based on the evidence above. Edited May 30 by Dean Hamer
Marc Posted May 30 Posted May 30 I would advise on contacting your hosting provider for assistance with this. The index file is the root to all pages on your site, so that wouldnt nessesarily be an indication its not mysql. SeNioR- 1
Randy Calvert Posted May 30 Posted May 30 Are you running mySQL 8 or mySQL 5? If you are running mySQL 8, see the following post from Matt and see if that plugin makes any difference. Marc 1
Dean Hamer Posted June 3 Author Posted June 3 Apologies for the lack of communication on this. I must start with an apology. The slowness was not application-based at all and was, in fact, a cyber attack from a Hong-based IP. Once it was blocked, our issue was instantly fixed. I am still not sure why making the forum offline fixed the issue though 🙄 SeNioR- and Jim M 2
Randy Calvert Posted June 3 Posted June 3 6 hours ago, Dean Hamer said: Apologies for the lack of communication on this. I must start with an apology. The slowness was not application-based at all and was, in fact, a cyber attack from a Hong-based IP. Once it was blocked, our issue was instantly fixed. I am still not sure why making the forum offline fixed the issue though 🙄 Because it was not a “real” fix. Turning the forum offline basically disallows anything from happening. Serving that offline page takes very little resources. It’s like saying you fixed a problem with your car by turning it off. Sure its no longer making the sound… but its not what caused it to happen. 🙂 Dean Hamer and Jim M 2
Recommended Posts