View Issue Details

IDProjectCategoryView StatusLast Update
0006580OXID eShop (all versions)7. --- Other tools --------------public2024-04-03 09:57
Reportersven.sutulovic Assigned To 
Status resolvedResolutionfixed 
Product Version4.10.1 / 5.3.1 
Fixed in Version6.2.3 
Summary0006580: OnlineLicenseCheck renders shop unusable in high concurrency environment
DescriptionThe license check of Oxid is implemented in a way that concurrent requests lead to COUNT() queries stacking up within the timeframe Oxid should perform the check. This can also lead to unnecessary duplicate entries of the config key "sOnlineLicenseNextCheckTime" in the oxConfig table.
Steps To ReproduceCOUNT() queries in oxUserCounter::getAdminCount() and oxUserCounter::getActiveAdminCount() have to be "slow", e.g. by having a high amount of rows (~1.000.000 in our case). Remove the config key "sOnlineLicenseNextCheckTime" from the oxConfig table and hit the shop with a test tool for concurrent requests. MySQL SHOW PROCESSLIST shows the COUNT() queries stacking up. If still operating on MyISAM, you will see a full table lock as expected, that basically never gets released if you have enough queries stacked up.
Additional InformationIn high load / concurrency environments, the license check can render the shop unusable. Oxid saves the timestamp of when the license check should be triggered in the oxConfig table. Any request to the shop after that timestamp will invoke the oxSystemEventHandler to perform the license check.

Since there is no lock mechanic and the timestamp is overridden at the end of oxSystemEventHandler::_sendShopInformation(), every request within the time the first request has fully performed the license check will invoke another check. This can happen always, even in low concurrency environments, but is a true database killer if you have enough requests going on.

An easy fix should be to move the call of oxSystemEventHandler::_updateNextCheckTime() right after oxSystemEventHandler::_needToSendShopInformation() has determined that it needs to invoke the license check.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined


Sven Brunk

2024-04-03 09:57

administrator   ~0016693

The order was changed in CE component 6.6.0 released in OXID eShop 6.2.3