Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: obioba on May 05, 2019, 11:27:20 AM

Title: 100% Cpu Usage and errorlogs
Post by: obioba on May 05, 2019, 11:27:20 AM
Hi SMF Community!

We are using a lot of years ago SMF 2.0 RC2 SMF and everything were fine always.
But 1 week ago our server hostings get a ddos attack. After that the site cpu usage goes to 100% always--> can't enter the site, just to cpanel.
Try eveything, moved to cloud.  Now we have more space to files but still 100% cpu usage.
Edited the htaccess file, killed all bots, support said too much thing in the htaccess file. Pff
And the error logs:
PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/kilences/public_html/Sources/Subs-Db-mysql.php on line 681
At he php ini the maximum is 999 so not understand this really why do that.

PHP Fatal error:  Function name must be a string in /home/kilences/public_html/Sources/QueryString.php on line 369
Okay i take load.php 195 line a preg_replace_callback. But i feel if i do something the next error will hit me.

PHP Parse error:  syntax error, unexpected '$pattern' (T_VARIABLE) in /home/kilences/public_html/Sources/Load.php(197)
This will be the line: return ' . strtr($ent_check[0], array('&' => '&'))  . 'htmlspecialchars($string, $quote_style, ' . ($utf8 ? '\'UTF-8\'' : '$charset') . ')' . $ent_check[1] . ';'),

But what is the cause of the 100% cpu usage?

Thanks your helps.
Title: Re: 100% Cpu Usage and errorlogs
Post by: vbgamer45 on May 05, 2019, 02:17:30 PM
What PHP version are you on and you need to upgrade to SMF 2.0.15
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 05, 2019, 02:52:31 PM
Hi!

PHP 5.6.
But how to upgrade if i don't know the cpu usage will down?
Title: Re: 100% Cpu Usage and errorlogs
Post by: vbgamer45 on May 05, 2019, 03:02:33 PM
backup files and database.
Then grab large upgrade package for SMF 2.0.15 then try to upgrade from that.
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 05, 2019, 04:05:59 PM
However the 100% cpu usage gone.
Site chat is back. :D
New problem is this:
Table 'kilences_plan9.smf_topics' doesn't exist
Maybe i deleted? If i deleted how many data gone?
Title: Re: 100% Cpu Usage and errorlogs
Post by: vbgamer45 on May 05, 2019, 04:36:39 PM
Make sure your database inforamtion is right in the settings.php file
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 05, 2019, 04:43:18 PM
Seems to me correct.
I try to backup the deleted tables if that possible, once the support reply.
And after thinking about upgrade, backup saved.
Title: Re: 100% Cpu Usage and errorlogs
Post by: Biology Forums on May 05, 2019, 09:43:18 PM
Your CPU went down after upgrading to a newer version of PHP?
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 06, 2019, 01:31:58 PM
I don't know what really happened. The support said after i killed a lot of bots in the access.php, the index.php and access.php cause the high cpu usage. So many command and etc.
But i didn't change and magic to down the cpu usage.
Bigger problem to have to make a table, smf_topics' doesn't exist.
Title: Re: 100% Cpu Usage and errorlogs
Post by: vbgamer45 on May 06, 2019, 02:36:24 PM
access.php is not part of SMF.
smf_topics check your old backups.
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 06, 2019, 03:15:29 PM
Not fully backups, my miss.
Maybe, if i copy one _topics table. "_log_topics"?
Title: Re: 100% Cpu Usage and errorlogs
Post by: vbgamer45 on May 06, 2019, 03:22:27 PM
no.
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 06, 2019, 03:36:41 PM
Okay.
And what happening if we are upgrading?
Can we save the topics what made at past few years and can we see all of them in the upgraded forum?
Title: Re: 100% Cpu Usage and errorlogs
Post by: Herman's Mixen on May 06, 2019, 03:59:00 PM
Your topics and all SMF related stuff is still in your database

So YES its all there after the Upgrade ;)
Title: Re: 100% Cpu Usage and errorlogs
Post by: Illori on May 06, 2019, 04:00:45 PM
Quote from: Herman's Mixen on May 06, 2019, 03:59:00 PM
Your topics and all SMF related stuff is still in your database

So YES its all there after the Upgrade ;)

that does not fix the issue that the topics table may have gone missing or is not found. that has to be resolved separately.
Title: Re: 100% Cpu Usage and errorlogs
Post by: obioba on May 06, 2019, 04:28:35 PM
So have to create an smf_table which is look like the previous one?