Hi, I have an Omeka 1.5.3 site wherein the omeka_sessions table has over 65,000 rows, which appears to be causing my database connection to timeout.
Is this high number normal?
Is there a safe way to fix it?
Is this fixed in future versions (assuming it's a problem)?
Thanks -- E
The sessions table is just used to store users' session data. You should be able to clear out all the rows if want, it would just result in any logged-in users losing their sessions. You could also just delete the expired rows, those are ones where the
lifetime columns added together are less than the current timestamp.
By default, sessions last 14 days, and then are only cleaned up when PHP's normal session garbage collection runs. Omeka's session handling is just an exact usage of a Zend Framework component, so except to the extent that it's been changed in later versions of the framework, it doesn't really work differently in different Omeka versions.
The number of rows you describe seems abnormally high, but very high traffic could legitimately create an extremely large number of sessions. This could be merely a temporary problem that just needs a one-time fix of manually clearing the sessions (assuming they're what's causing your timeout issue).
Ok, that makes sense then. I guess I thought that only authenticated sessions would be stored in the database (thus the number seemed high), but looking at the Zend and PHP documentation helps me understand a bit more what's happening. Thanks.