MyBB Community Forums

Full Version: Database size increases very fast 1.8.22
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Database size increases very fast 1.8.22

Hi community of MyBB.
I have a small community of winning eleven with plugins:
- Country Flag by Starpaul20
- Online today b by Dark Neo
- PHP and Template Conditional by ZiNgA BurgA
- Top Stats by bazar & Supryk

Previous versions of MyBB the size of the databases are very small size approximately 4MB for backup.
but now my backup size its more the 30MB and in a few days it increased for more 44MB.
If the increase continues in this way, maintenance will be very difficult.

[Image: mybb-database.png]

How can i fix this?

I have read this post but I don't know if it's my solution.

should i disable the plugins?
in previous versions I did not have that problem

Note: I know this has nothing to do with the community but I think it is important to write it too
Please, safeguard your life, stay home, wash your hands with soap and avoid the spread of the pandemic Covid-19
the virus is very dangerous and we must take care of our grandparents and all of our family, please stay home and follow the health steps of your community.

Thanks in advance for the support
probably sessions table is filling up & there is a reference to related thread [Post Link]
Thanks you .m.

I will follow the recommendations to performance the forum

- Can purge session records (sessions table) via phpMyAdmin?

Blush
^
Quote:Can purge session records (sessions table) via phpMyAdmin?
yes. however its better to use suggested task so that it can run on regular basis.
(2020-03-24, 02:35 PM).m. Wrote: [ -> ]^
Quote:Can purge session records (sessions table) via phpMyAdmin?
yes. however its better to use suggested task so that it can run on regular basis.

ok, i will doit with task admin.
[Image: Captura-de-pantalla-2020-03-24-a-la-s-9-49-00-a-m.png]

I'm concerned about increasing the size of the database.

Hopefully with this it is fixed and I can return to regular size 4MB for backup.

Deactivate Plugins because increase the SQL Queries

- Online Today (2.0.5)
- Top Stats (1.0.4)

Thank you .m.

Big Grin

do it another backup of database with purge session records (sessions table) via task panel admin MyBB



database size low but very little just -1.8MB, the database was greatly increased in a short time (3 months)  to a very large size 42.34 MB



[Image: Captura-de-pantalla-2020-03-24-a-la-s-4-56-26-p-m.png]

it's a small community for such a large increase in a short time  Confused

I hope this does not give me problems when updating  Confused



some more recommendation to optimize the database are welcome.



Thank you in advance for support!



greetings
Before guessing,
simply have a look at your database with an administrative tool (PHPMyAdmin, adminer.php etc) and find the table(s) that are massively growing in size.
Check table sizes and you'll certainly find the spikes!

[ExiTuS]
(2020-03-24, 10:29 PM)[ExiTuS] Wrote: [ -> ]Before guessing,
simply have a look at your database with an administrative tool (PHPMyAdmin, adminer.php etc) and find the table(s) that are massively growing in size.

Check table sizes and you'll certainly find the spikes!

[ExiTuS]

Thanks for the feedback [ExiTuS]

I have been a big surprise in phpmyadmin, the mybb_session its very large size 255.3 MB  Confused

in the panel of MyBB the size its 42.34 MB
¿how can there be so much difference between ACP MyBB and PhpMyAdmin?...  

[Image: mybb-sessions.png]

well, i think the best way its PhpMyAdmin,  I don't know what happens to that part of mybb_session but it is my situation.

thanks in advance for the support!
Great, now you know why the database is increasing - because of sessions.

My suggestion for a cleanup is to drop all records with a timestamp less than x minutes. Please calculate the timstamp yourself. Then manually run SQL:
DELETE FROM mybb_sessions WHERE time < [CURRENT UNIXTIMESTAMP - 15 MINUTES]

This will be a solution just for the moment!

It really needs to be checked why sessions are not dropped by the board software.

[ExiTuS]
(2020-03-25, 01:31 AM)[ExiTuS] Wrote: [ -> ]Great, now you know why the database is increasing - because of sessions.

My suggestion for a cleanup is to drop all records with a timestamp less than x minutes. Please calculate the timstamp yourself. Then manually run SQL:
DELETE FROM mybb_sessions WHERE time < [CURRENT UNIXTIMESTAMP - 15 MINUTES]

This will be a solution just for the moment!

It really needs to be checked why sessions are not dropped by the board software.

[ExiTuS]

I was thinking on TRUNCATE TABLE command deletes the data inside a table, but not the table itself.

Quote:TRUNCATE TABLE mybb_sessions;

but I'm going to do a little more research to see if it's the right step

Thank You [ExiTuS]

Shy
Sure, you can truncate the table as well. Then you will also drop sessions of current online users - these will loose their session and are not counted in statistics for this moment. Who cares! Smile
So feel free to truncate.

[ExiTuS]
Pages: 1 2