TITLE: Web Admin edition: admin panel pages 2–4 s slower because pm_License never caches an empty extension-license list (Catalog ContentInclude hook)
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE: Plesk Obsidian 18.0.81.8, AlmaLinux 8.10, x86_64, Extensions Catalog 1.18.6
PROBLEM DESCRIPTION:
- On servers with a Web Admin edition key (plesk-unified) that contains no extension or additional licenses, every classic panel page is slow while the server is idle: /admin/home/ takes 1.4–2.5 s and /smb/web/view about 4 s. On Web Pro servers with the same Plesk version and hardware, the same pages take 0.1–0.4 s.
- Profiling shows that on every page the Modules_Catalog_ContentInclude hook (Sidebar::getData → Catalog::getAvailable → Fetcher::getPackages) calls pm_License::getExtensionLicenseInfo() about 900–1900 times.
- pm_License::$_cache is filled only when the key contains extension licenses. When there are none it stays an empty array, so every call re-parses the key (getProperties() ≈ 1.1 ms).
STEPS TO REPRODUCE:
1. Use a Web Admin key without additional licenses (plesk bin keyinfo --list shows edition-name: web admin edition).
2. Run with plesk php:
<?php require_once "sdk.php"; pm_Context::init("catalog");
$l = new pm_License; $t = microtime(true);
for ($i = 0; $i < 300; $i++) $l->getExtensionLicenseInfo("x$i");
printf("%.3f ms/lookup\n", (microtime(true) - $t) / 300 * 1000);
$p = new ReflectionProperty($l, "_cache"); $p->setAccessible(true);
echo "_cache=", count($p->getValue($l)), "\n";
ACTUAL RESULT:
- Web Admin server A: _cache=0, 1.157 ms/lookup. Web Admin server B: _cache=0, 0.639 ms/lookup.
- Web Pro server (wp-toolkit + dnssec licenses): _cache=3, 0.032 ms/lookup.
- When one dummy entry is injected into $_cache via Reflection on server A, the lookup time drops to 0.000 ms.
EXPECTED RESULT: The lookup result, including an empty one, is cached for the request, and panel pages load as fast as on Web Pro.
ANY ADDITIONAL INFORMATION: The Catalog extension cannot be disabled ("Operation is not permitted"), so Web Admin users have no workaround short of buying an extension license.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM: Confirm bug
---
I can't post in Reports yet (fewer than 5 helpful posts) — could a moderator please move this there?
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE: Plesk Obsidian 18.0.81.8, AlmaLinux 8.10, x86_64, Extensions Catalog 1.18.6
PROBLEM DESCRIPTION:
- On servers with a Web Admin edition key (plesk-unified) that contains no extension or additional licenses, every classic panel page is slow while the server is idle: /admin/home/ takes 1.4–2.5 s and /smb/web/view about 4 s. On Web Pro servers with the same Plesk version and hardware, the same pages take 0.1–0.4 s.
- Profiling shows that on every page the Modules_Catalog_ContentInclude hook (Sidebar::getData → Catalog::getAvailable → Fetcher::getPackages) calls pm_License::getExtensionLicenseInfo() about 900–1900 times.
- pm_License::$_cache is filled only when the key contains extension licenses. When there are none it stays an empty array, so every call re-parses the key (getProperties() ≈ 1.1 ms).
STEPS TO REPRODUCE:
1. Use a Web Admin key without additional licenses (plesk bin keyinfo --list shows edition-name: web admin edition).
2. Run with plesk php:
<?php require_once "sdk.php"; pm_Context::init("catalog");
$l = new pm_License; $t = microtime(true);
for ($i = 0; $i < 300; $i++) $l->getExtensionLicenseInfo("x$i");
printf("%.3f ms/lookup\n", (microtime(true) - $t) / 300 * 1000);
$p = new ReflectionProperty($l, "_cache"); $p->setAccessible(true);
echo "_cache=", count($p->getValue($l)), "\n";
ACTUAL RESULT:
- Web Admin server A: _cache=0, 1.157 ms/lookup. Web Admin server B: _cache=0, 0.639 ms/lookup.
- Web Pro server (wp-toolkit + dnssec licenses): _cache=3, 0.032 ms/lookup.
- When one dummy entry is injected into $_cache via Reflection on server A, the lookup time drops to 0.000 ms.
EXPECTED RESULT: The lookup result, including an empty one, is cached for the request, and panel pages load as fast as on Web Pro.
ANY ADDITIONAL INFORMATION: The Catalog extension cannot be disabled ("Operation is not permitted"), so Web Admin users have no workaround short of buying an extension license.
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM: Confirm bug
---
I can't post in Reports yet (fewer than 5 helpful posts) — could a moderator please move this there?