Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Broken DB tables and plugin tables optimization
Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
Apr 25, 2017 - 2:28 pm

 Hi,

every week I have some kind of problems regarding the tables of the database and the website usually stops working because of that. Now it's just unbearably slow, most of the time it takes a minute to load a page. Usually the website just goes down, saying there's a problem reaching the db.

Last time the problem was with the table sfcache. 

I reckon the tables are getting bigger and bigger, so is there a way to optimize them? 

Thank you in advance,

http://realityhouse.it

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 25, 2017 - 3:09 pm

Actually, MySQL has proven to be remarkably resilient and handles large tables and databases remarkably well. It is extremely doubtful that you have any problem with the size of the DB unless you are starting to see tables with records in the hundreds of thousands - and even then it is manageable.

However - your database DOES require a little care and attention now and then - regardless of it's size. To put it in plain language, it can get a little disordered and chaotic. We recommend that a full database optimisation is performed regularly - say once a week. This will keep it in good condition and working at full strength and performance.

There are quite a few WP plugins that will enable you to do this from within the WP Admin. At least one - titled I believe, WP DB Manager, will allow you to set a scheduled optimisation run so that it all takes place in the background.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
May 3, 2017 - 5:07 am

Thank you for your answer. Just to show you, this morning we are dealing with this kind or problem:

http://realityhouse.it

Topics don't appear on the Homepage and you need to browse through them to find them, with a lot of missing informations (the latest discussions on the right, who posted and where, etc.). 

Plus, we keep receiving an error window from page to page (you can see it by browsing through them).

Any idea? 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 3, 2017 - 5:43 am

Luca Urzi' said
Topics don't appear on the Homepage and you need to browse through them to find them, with a lot of missing informations (the latest discussions on the right, who posted and where, etc.). 

I am going to need more information here. Like - where should this show up? Are you using the widget? Or the template tag? What are the settings?

Plus, we keep receiving an error window from page to page (you can see it by browsing through them).

Is this telling you that you have an invalid database query? I see it vaguely although it does not show up too well. If so then please go the forum admin > toolbox > error log and clear the current log (button at the bottom). Then switch pages on the site to generate the error. Then go back to the error log and copy the database error text and paste it to a post here for me to look at.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
May 3, 2017 - 6:19 am

Yellow Swordfish said

Luca Urzi' said
Topics don't appear on the Homepage and you need to browse through them to find them, with a lot of missing informations (the latest discussions on the right, who posted and where, etc.). 

I am going to need more information here. Like - where should this show up? Are you using the widget? Or the template tag? What are the settings?

Plus, we keep receiving an error window from page to page (you can see it by browsing through them).

Is this telling you that you have an invalid database query? I see it vaguely although it does not show up too well. If so then please go the forum admin > toolbox > error log and clear the current log (button at the bottom). Then switch pages on the site to generate the error. Then go back to the error log and copy the database error text and paste it to a post here for me to look at.  

3 maggio, 2017 12:17 | spaErrError | 1 | database

file: /var/www/html/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php
line: 101
function: spdb_table
error: Table 'avwp_sfmembers' is marked as crashed and should be repaired

SELECT * FROM avwp_sfmembers WHERE user_id=102

3 maggio, 2017 12:17 | spaErrError | 1 | database


file: /var/www/html/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php
line: 105
function: sp_create_member_data
error: Duplicate entry '102' for key 'PRIMARY'

INSERT INTO avwp_sfmembers (user_id, display_name, admin, moderator, avatar, signature, posts, lastvisit, checktime, newposts, admin_options, user_options, feedkey) VALUES (102, 'Alex87', 0, 0, 'a:1:{s:8:"uploaded";s:0:"";}', '', -1, '2017-05-03 12:17:57', '2017-05-03 12:17:57', 'a:3:{s:6:"topics";a:0:{}s:6:"forums";a:0:{}s:4:"post";a:0:{}}', '', 'a:6:{s:10:"hidestatus";i:0;s:8:"timezone";d:2;s:15:"timezone_string";s:11:"Europe/Rome";s:6:"editor";i:1;s:8:"namesync";i:1;s:11:"unreadposts";s:2:"50";}', 'd952fe55-97cd-4746-957f-0127a5645f9d')

and others :/ 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
May 3, 2017 - 6:37 am

It states it quite clearly in the error message for the DB:

error: Table ‘avwp_sfmembers’ is marked as crashed and should be repaired

See post #2 above. This needs to be done urgently. It is probably also responsible for missing information in the display. Note it now says it has crashed completely so it needs a repair AND an optimise after that.

After you have repaired and optimised the database, clear out the error log again and repeat the test.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
May 7, 2017 - 3:03 pm

I did everything you suggested (fixed the tables and optimized them with a plugin) but I keep receiving an error message. 

You can see it on every page you browse.

http://realityhouse.it/

What can I do? 

Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
May 7, 2017 - 3:39 pm

More info for you:

Image Enlarger

Image Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 8, 2017 - 9:44 am

sorry, but I do not see any errors displayed on the page you provided (http://realityhouse.it)...  is it only happening for admins?  or have you corrected it?

and your latest images were not uploaded...

Avatar
Luca Urzi'
Member
sp_UserOfflineSmall Offline
May 8, 2017 - 11:08 am

Mr Papa said
sorry, but I do not see any errors displayed on the page you provided (http://realityhouse.it)...  is it only happening for admins?  or have you corrected it?

and your latest images were not uploaded...  

I updated the server and that was it.

As for the two images:

Image Enlarger

Image Enlarger

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 639
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17342
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10116
Posts: 79581