MyBB Community Forums
[Performance] Crashed Table - Printable Version

+- MyBB Community Forums (
+-- Forum: Community Archive (
+--- Forum: Archived Forums (
+---- Forum: Archived Development and Support (
+----- Forum: MyBB 1.6 (
+------ Forum: 1.6 General Support (
+------ 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 )