MyBB Community Forums
[Performance] Crashed Table - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [Performance] Crashed Table (/thread-85935.html)

Pages: 1 2


Crashed Table - Valaki - 2011-01-09

I restarted my Vps.
Now, the mybb_sessions table is crashed.

I have repaired it, and now the forum works, but i never saw similar problem in my site.

Is there any way to analyze the db for possible problems?

+Can i clean all the data from the mybb_sessions table?


RE: Chrashed Table - Matt - 2011-01-09

If you clear out the sessions table it'll just log everybody out.


RE: Chrashed Table - Sajuuk - 2011-01-09

Tables crash all the time, it's just the thing of having a large forum.
If you empty the mybb_sessions table, all sessions will be stopped.


RE: Chrashed Table - Valaki - 2011-01-09

Thank you!

Now i see, the posts table contains more records than what the forum statistics shows.
(I recounted the statistics in mybb's admin cp too)

How to analyze this problem?


RE: Chrashed Table - Matt - 2011-01-09

You mean the pid is higher or there's more actual rows??


RE: Chrashed Table - Valaki - 2011-01-09

More rows.


RE: Chrashed Table - Matt - 2011-01-09

In ./inc/functions_rebuild.php, line 27:

$query = $db->simple_select("forums", "SUM(posts) AS numposts");

Try changing that to:

$query = $db->simple_select("posts", "COUNT(*) AS numposts");

Does it work then?? Don't know why it counts the number from the forums table by default as if that's out of sync, the stats will be out of sync too... maybe instead of the code edit, run the Rebuild Forum Counters one first.


RE: Chrashed Table - Valaki - 2011-01-09

While i optimized the posts table, my webmaster rebooted the server.
Is that can be the source of the problem?

I have rebuilded the forum counters. Nothing happened.

Now i editing the functions_rebuild.php...


RE: Chrashed Table - labrocca - 2011-01-09

You can try to set your SESSIONS table to innodb. It will increase stability.


RE: Chrashed Table - Valaki - 2011-01-09

Thanks. i ask my webmaster about this.

I forgotten to say but my threads table out of sync too.
(and maybe some other tables too... Sad )