combu_SessionToken ...
 
Notifications
Clear all

combu_SessionToken table seems too large

3 Posts
2 Users
0 Reactions
452 Views
(@punchey)
Posts: 36
Trusted Member
Topic starter
 

My combu_SessionToken table is up to 6.3GB even though my combu_LeaderBoard_User table is only 0.2GB. Is this normal? I've been warned by my hosting provider that I must reduce the size of my database. Is there some kind of pruning that I can/should do to combu_SessionToken?

 
Posted : 24/02/2022 3:03 pm
(@skaredcreations)
Posts: 805
Prominent Member Admin
 

First thing first make a backup of the current database, then you can go to Session Tokens page where you can set a date (for example one month ago) and click DELETE to delete all session tokens up to the date you set in the field (take care to not set today as date before clicking DELETE else also the currently active tokens will be deleted and the active sessions will give error in your app even if they really only have to quit and relaunch the app and it'll work again).

EDIT:

By the way on the server you'll find a sample script /extra/clean_sessiontokens.php that you can use in a scheduled task on your server to delete periodically the session tokens older than XX days (there's a variable inside it called CLEAN_FROM_DAYS that you can assign), you could create a scheduled task to run once per week for example (most providers allow you to set scheduled tasks, but this depends on them; alternatively you have to do it manually as above). If you're going to use this file in a scheduled tasks then I suggest to duplicate it and move in a folder where the web users cannot access (theoretically the extra folder shouldn't exist on server unless you have some files of your own, that folder is meant to contain sample scripts), so that you don't need to re-apply changes eventually after a server update if you edit it.

FRANCESCO CROCETTI @ SKARED CREATIONS

 
Posted : 24/02/2022 3:50 pm
(@punchey)
Posts: 36
Trusted Member
Topic starter
 

@skaredcreations thanks for the support! That's what I needed.

 
Posted : 24/02/2022 7:56 pm
Share: