Session Debloater

Session Debloater
Session Debloater is an extension that designed to fix a known OpenCart 3.x issue #7094 and prevent bloat of the oc_session table.
The extension is compatible with OpenCart versions 3.x up to and including 3.0.3.6. In these versions, expired customer sessions are not removed from the database, so the oc_session table size can grow up to gigabytes. This issue was only finally fixed in version 3.0.3.8 - expired sessions are deleted at the start of a new session, but with a probability of about 1 in 100 (to reduce the load on the server). In version 3.0.3.7 there was a bug and sessions were cleared frequently - every 99 times out of 100.

WARNING
DON'T INSTALL THE EXTENSION IF YOU CAN'T OR YOU DON'T KNOW HOW TO RESTORE THE DB AND FILES IN CASE OF ERRORS!
YOU ARE FULLY RESPONSIBLE FOR ANY DAMAGE TO YOUR STORE FILES OR LOSS OF DATA, SO START ALL THE CHANGES BY BACKING UP THE DB AND FILES!

Main features
* Removes old session entries from the oc_session table.
* Has two types of implementation (see below).
* Does not modify system files (OCMOD).

So there are two types of the fix to download:
1. session_debloater__default.ocmod.zip - the trigger (customer login) fires randomly about 1/100.
2. session_debloater__instant.ocmod.zip - expired sessions delete every time a new session starts.

Note
Deleting too many records can take a long time and the query execution will be interrupted, which in turn will cause an error message, something like:
Fatal error: Uncaught Exception: Error: Lock wait timeout exceeded; try restarting transaction


This is not an extension error! To avoid this, it is best to clear the `oc_session` table manually before installing the extension using, for example, phpMyAdmin.

Related links
How-To.
Changelog.
Session Debloater web page.

License
Licensed under the MIT License.

Contact
Have a question, need support or want a discount? Don't hesitate to contact me using the "Get Support" form, comments below or email (ocmod.space at gmail.com).

Feedback
I like feedbacks, so write comments and rate the extension in your OpenCart Marketplace account ("Rate your Downloads" section)

What customers say about Session Debloater

bibi2424
it is working very well
~bibi2424
kungartur
Works excellent. Just what I needed when I found out my database had stored 2 million sessions.
~kungartur




Download
  • Developed by OpenCart Community
  • Documentation Included

Rating

Compatibility
3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.5, 3.0.3.6, 3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.5, 3.0.3.6

Last Update
14 Jun 2024

Created
20 Feb 2020
1407 Downloads
14 Comments
ocmod.space
ocmod.space
Member since: 10 Jan 2018

View all extensions Get Support