TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 118
  • Total: 119
  • lurkalot

smf_sessions

Started by domeen, April 08, 2008, 11:08:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

domeen

Hello,

I have a very busy site, and I checked if everything is correct, and I saw that the sql tabel:smf_sessions   is 1Gb..... Can I empty that table?

Ken.

Sounds like a question for the SMF forums domeen because it's an SMF table.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

ianus

Greetings!

Yes, this is a know problem with SMF 1.1.x
I can give you a link to a german solution and try to translate the interesting parts.

1.) You can delete the contend of the sessions table (not the table itself)
->sideeffect: all users have to log in again.

2.)
Workaround:
In index.php insert after

// Start the session. (assuming it hasn't already been.)
loadSession();


this

sessionGC();



Than make the sessionGC-Funktion in Load.php more usefull

Change:
DELETE FROM {$db_prefix}sessions

to

DELETE LOW_PRIORITY FROM {$db_prefix}sessions

This will delete all sessions if the DB has "not much to do"


Original thread:
http://www.simplemachines.org/community/index.php?topic=80805.msg922769#msg922769

I will not take any response. Use at your own risk and please backup first.
I have changed my SMF this way, and for me, it works and keep the sessions table small.

domeen

so first I empty the table and then the workaroun? so if I do the workaround, the smf_session table  will be small in the future?

G6Cad

ypu got the link to the discussions on this issue on SMF, i suggest you browse there and read the topic he linked to.
This issue is pure SMF and have nothing to do with TP what so ever

This website is proudly hosted on Crocweb Cloud Website Hosting.