-
☆ A M B ☆
- 2,475 Posts
I had a weird thing happen today... working on a Revo 2.0.0-pl site, my connection hung (like always... thanks to AT&T). I was saving a Snippet, and I had just updated the name, and clicked save. I got an error saying the "Snippet could not be found"... and then I got dumped out of the manager. When I tried to log back in, I got another error message saying that my user could not be found. Even the front page went down: it displayed the message "Sorry, the page you are looking for could not be found." Wow.
Luckily, I had another admin account already set up for the client, so I logged in using that. I cleared the cache, and flushed all sessions, and then I could log back in normally. The front page came back up and everything was well with the world again.
But I’m wondering WHAT HAPPENED? And more importantly, how can I clear the cache and flush sessions manually from the command line if the system ever locks up like this again?
Thanks!
Our table modx_session meanwhile has a size of 20 MB. Do you recommend to clear this table once in a while? Does this have any advantages or is a big size a disadvantage?
-
MODX Staff
- 10,725 Posts
You can change the session settings to control how long the sessions persist in the database, but if you have a lot of traffic, you are going to consequently have a lot of sessions. You can shorten the lifetime and gc_lifetime settings to reduce how long they last and increase the frequency with which they are deleted when expired, or even configure your front-end to use the default file-based PHP session handler (separate from the back-end).
The size being 20Mb is of no real consequence. A high-traffic site might typically see this table larger than 80 or 100Mb in size.
OK, thanks. I will let it like it is and not delete the session-table.