Support Forum

15GB Error Log Table Row!

JI jim
jim
Member

I woke up this morning to a main forum (Group View) page that loads, with 404 errors on all forum/topic pages.

While troubleshooting and attempting to optimize db tables, I discovered we have 15± GB of data for the wp_1_sferrorlog table row! (See attached screenshot.) I’m not sure if there is a relationship, but it would explain why the Error Log tab on the SF Admin page will not load. And it clearly needs to be addressed.

1. How would I go about cleaning out the error log? Can I just empty the row from PHP MyAdmin?

2. Any other suggestions for troubleshooting why forum & topic pages might throw Page Not Found errors are greatly appreciated.

Thanks, and Merry Christmas!

sferrorlog.png

22 Answers

New Answer

MP Mr Papa
Mr Papa
Member

yes, just truncate the sferrorlog table… would be nice to grab a couple of the errors and see what they are first though…

so what changed on your site?? wp update? sp update? wp plugin or theme updates?

JI jim
jim
Member

That’s just it, nothing changed on our end since the site was working fine last.

Still waiting word to see if mod_security has been added or anything else changed at the server level.

Also trying to get back into cPanel to to truncate as you suggest… made the mistake of hitting optimize on that row and I think that threw our levels out of control.

To “truncate” can I just select the row in MyAdmin and hit empty? Will try to browse it first and grab some recent errors… just focussed on getting the site back up now!

JI jim
jim
Member

OK, I went ahead and truncated wp_1_sferrorlog after exporting the most recent 100 errors. Funny thing is, the last errors appear to have been thrown back in October. (Or, I didn’t actually dumb the latest records.) confused

Here’s a couple example errors that repeat in the export:

(72187841, ‘2012-10-16 13:48:16’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-group-view-class.php<br />line: 268<br />function: sp_groupview_query<br />Warning | Creating default object from empty value’),
(72187842, ‘2012-10-16 13:48:16’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-group-view-class.php<br />line: 314<br />function: sp_groupview_query<br />Warning | Creating default object from empty value’),

Anyway, it required restarting both HTTP and MySQL, but the site seems to be back up now and the forums are functioning as expected. I’m going to presume the massive error log was bogging down the database.

A couple concerns at this point…

1. Doesn’t the error log empty itself automatically or only hold x number of records? Or should we be manually emptying the log periodically?

2. It looks like the log is already filling up again with the following errors:

file: /simple-press/forum/content/classes/sp-member-view-class.php
line: 348
function: sp_memberslist_query
Warning | Creating default object from empty value

And after emptying the log (from sp admin) and reloading a couple pages:

file: /simple-press/forum/content/classes/sp-forum-view-class.php
line: 451
function: sp_forumview_query
Warning | Creating default object from empty value

3. How can I ensure this doesn’t happen again?

JI jim
jim
Member

PS: In doing this, I did notice that the mod_security plugin is indeed running in our root WHM account. I believe it has been for some time now come to think of it, and the forums are currently working.

Just an FYI. Any thoughts regarding that are also appreciated.

MP Mr Papa
Mr Papa
Member

to truncate it, in phmyadmin, go to the sql tab and enter

truncate wp_sferrorlog

your prefix might be other than wp_… so whatever the table name is…

MP Mr Papa
Mr Papa
Member

those are notices – not errors… and removed in 5.2… if not running 5.2 with php 3.4 you will get those notices since php changed how notices work… but 5.2 takes em out of the equation…

so its possible you were just creating lots of errors in the log for the notices and it got so big your mysql server couldnt handle it… might be worth a repair on your db too…

but again, all links I try in the forum are working…

MP Mr Papa
Mr Papa
Member

to be clear, to prevent the error log from filling with those php 3.4 notices, upgrade to 5.2…

for what its worth, a 5.2.1 will be coming out in day or two….

MP Mr Papa
Mr Papa
Member

will have to research this… the error log should only contain the last 50 entries… is shouldnt grow any larger…

JI jim
jim
Member

Thanks! With 78+ Million entries, it looks like ours has never emptied over the past 5± years, or something has gone terribly awry.

And by the way, regarding our plugin version, FYI…

Simple:Press
Version: 5.2
Build: 9495
Release: Release

PHP
Version: 5.4.5
Memory: 500M
Max Upload: 32M
Timeout: 300

MP Mr Papa
Mr Papa
Member

but that would explain the notices being from long ago… pre 5.2… think I have a handle on why it might not be clearing for you… if it tests well, will be in the 5.2.1 update in next day or two…

JI jim
jim
Member

Cool. Happy to test on our dev install. Remember, we run a multisite network, if it matters.

JI jim
jim
Member

Mr Papa said
but that would explain the notices being from long ago… pre 5.2…

You mean these? More than 300 since I posted here last…

(5, ‘2012-12-26 14:12:47’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-member-view-class.php<br />line: 348<br />function: sp_memberslist_query<br />Warning | Creating default object from empty value’),
(4, ‘2012-12-26 11:33:51’, ‘php’, ‘file: /simple-press/sp-api/sp-api-primitives.php<br />line: 600<br />function: Unavailable<br />Notice | Uninitialized string offset: 0’),
(6, ‘2012-12-26 14:12:47’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-member-view-class.php<br />line: 348<br />function: sp_memberslist_query<br />Warning | Creating default object from empty value’),
(7, ‘2012-12-26 14:12:47’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-member-view-class.php<br />line: 348<br />function: sp_memberslist_query<br />Warning | Creating default object from empty value’),
(8, ‘2012-12-26 14:12:47’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-member-view-class.php<br />line: 348<br />function: sp_memberslist_query<br />Warning | Creating default object from empty value’),
(9, ‘2012-12-26 14:12:47’, ‘php’, ‘file: /simple-press/forum/content/classes/sp-member-view-class.php<br />line: 348<br />function: sp_memberslist_query<br />Warning | Creating default object from empty value’),

MP Mr Papa
Mr Papa
Member

Its possible that some of those are ones that we have not changed yet – we fix them as we come across with though 5.2 was a concerted effort on the php default object warning… I will check the specifics…

but wow, your forum users must spend most of their time looking at the members list ;) if you have 300 like those which are largely from the members view…

MP Mr Papa
Mr Papa
Member

btw, the ones listed here are fixed in 5.2.1…