sonuyos Posted March 27, 2019 Share Posted March 27, 2019 Hello, My tblsessions is twice the size of my whole database, how can i clear the sessions files from SQL? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 27, 2019 Share Posted March 27, 2019 8 hours ago, sonuyos said: My tblsessions is twice the size of my whole database, how can i clear the sessions files from SQL? one option might be to truncate the table as that would effectively empty it... TRUNCATE TABLE tblsessions; ... but you might want to check with Support that doing so wouldn't cause any issues going forward. 0 Quote Link to comment Share on other sites More sharing options...
CommandHost Posted February 7, 2023 Share Posted February 7, 2023 We have been having this occur as well. Rather than removing ALL sessions from table storage, you can delete stale sessions past the documented default expiry time of 1 day with the following sql query. DELETE FROM `tblsessions` WHERE `last_activity` < UNIX_TIMESTAMP() - 86400 Add this to a cron job or run manually when needed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.