is an extension that designed to fix a known OpenCart 3.x issue #7094
and prevent bloat of the
The extension is compatible with OpenCart versions 3.x up to and including 18.104.22.168. In these versions, expired customer sessions are not removed from the database, so the
table size can grow up to gigabytes. This issue was only finally fixed in version 22.214.171.124 - 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 126.96.36.199 there was a bug and sessions were cleared frequently - every 99 times out of 100.
DON'T INSTALL THE EXTENSION IF YOU CAN'T 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!
* Removes old session entries from the
* Has two types of implementation (see below).
* Does not modify system files (OCMOD).
So there are two types of the fix to download:
- the trigger (customer login) fires randomly about 1/100 (default OC 188.8.131.52 behaviour).
- expired sessions delete every time a new session starts.
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
Licensed under the MIT License
If you have any related questions, please contact me using the "Get Support" form, comments below, or by email: firstname.lastname@example.org
I like feedbacks, so write comments and rate the extension in your OpenCart Marketplace account ("Rate your Downloads" section).