MyBB Community Forums

Full Version: mybb_datacache problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I have been struggling with the cache problem on my site for a long time. When the number of records in the mybb_datacache table is too large, the page goes crazy. It takes a long time to load, and when it loads, no .css file loads. The problem is fixed when I empty the mybb_datacache table and upload a few records from a copy of the forum. What could be the reason for this?
When db is used for "cache_store", MyBB stores several numbers of key caches in the datacache table. Normally, the number of records stored by MyBB should not exceed 40.

If you have too many records in this table, probably a plugin is doing evil. When you have a large growth in this table, check the data in it.

As for "no .css file loads", not sure it's caused by this table's problem.
Thank you for your response.
Within 5 hours of clearing the new table, the number of records in this table jumped to 8,853.

Most of them are repeated.

What could be the reason for this?
https://imgur.com/a/41l5TrH

+ when I cleared all data from cache = a: 1: {s: 7: "nextrun"; s: 10: "1566864000";}

8300 records cleared.
Uh, it's unusual.

What type of SQL database are you using?

Could you check the table structure for your mybb_datacache? Is the PRIMARY KEY still on column title?
For mybb_datacache, this is "MyISAM", some tables have InnoDB. (dvz_shoutbox only)

When I try to broadcast I receive this information: https://imgur.com/a/h0nnR87
(2019-08-27, 04:43 PM)ZamekPTS Wrote: [ -> ]For mybb_datacache, this is "MyISAM", some tables have InnoDB. (dvz_shoutbox only)

When I try to broadcast I receive this information: https://imgur.com/a/h0nnR87

So this table loses the PRIMARY KEY for title column?

If you need to re-enable the PRIMARY KEY for title column, the records in this table shouldn't have duplicate items with same title value.

I suggest you:
  1. Take your forum offline (only close it might not work) temporarily for accessing from users but you.
  2. Empty the mybb_datacache table. Don't do this, it will break the forum.
  3. Delete duplicate entries in the mybb_datacache table, manually.
  4. Alter this table to add title as the PRIMARY KEY.
  5. Navigate to the AdminCP directly via URL, such as https://your.domain/path_to_mybb/admin/index.php.
  6. Login into AdminCP and go to Tools & Maintenance > Cache Manager to rebuild all caches.
  7. Take your forum online.

Remember make a backup before any important operation.

BTW, plugin DVZ Integrity Tools can perform a database integrity check, you might need it. https://community.mybb.com/mods.php?action=view&pid=980
Use it at your own risk.
It definitely shouldn't be storing that many, it's only supposed to have 1 row per cache item (i.e. in your screenshot, stats and tasks should only be there once). The above advice is correct, I'm just curious why the table has no index in the first place.
Updated the post. Please be noticed with those strike-throughed lines.
Thank you very much for your help!

I did the action you asked for and everything works, the table has an index and currently there are 32 records.

Best regards and thank you again!