itratosTeam
Sehr aktives Mitglied
Guten Morgen @all,
wir stellten einen Bug im Caching fest - Hosting bei Hetzner.
Der Shop erzeugte laut Hetzner über 1 Mio Cache Files, selbst ein Cronjob half nicht das Problem zu lösen.
Bei der Verwendung von Redis erzeugte der Shop den Fehler
Diesen Fehler fixten wir im JTL Core File siehe Diff
wir stellten einen Bug im Caching fest - Hosting bei Hetzner.
Der Shop erzeugte laut Hetzner über 1 Mio Cache Files, selbst ein Cronjob half nicht das Problem zu lösen.
Bei der Verwendung von Redis erzeugte der Shop den Fehler
Code:
Fatal error: Uncaught TypeError: JTL\Cache\Methods\CacheRedis::setRedis(): Argument #3 ($pass) must be of type ?string, int given, called in /usr/www/users/shopimn/includes/src/Cache/Methods/CacheRedis.php on line 41 and defined in /usr/www/users/shopimn/includes/src/Cache/Methods/CacheRedis.php:62
Stack trace:
#0 /usr/www/users/shopimn/includes/src/Cache/Methods/CacheRedis.php(41): JTL\Cache\Methods\CacheRedis->setRedis()
#1 /usr/www/users/shopimn/includes/src/Cache/JTLCache.php(671): JTL\Cache\Methods\CacheRedis->__construct()
#2 /usr/www/users/shopimn/includes/src/Router/Controller/Backend/CacheController.php(153): JTL\Cache\JTLCache->checkAvailability()
#3 /usr/www/users/shopimn/includes/src/Router/Controller/Backend/CacheController.php(111): JTL\Router\Controller\Backend\CacheController->assignMethods()
#4 /usr/www/users/shopimn/includes/src/Router/Strategy/SmartyStrategy.php(40): JTL\Router\Controller\Backend\CacheController->getResponse()
#5 /usr/www/users/shopimn/includes/vendor/league/route/src/Route.php(167): JTL\Router\Strategy\SmartyStrategy->invokeRouteCallable()
#6 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(59): League\Route\Route->process()
#7 /usr/www/users/shopimn/includes/src/Router/Middleware/WizardCheckMiddleware.php(45): League\Route\Dispatcher->handle()
#8 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(59): JTL\Router\Middleware\WizardCheckMiddleware->process()
#9 /usr/www/users/shopimn/includes/src/Router/Middleware/UpdateCheckMiddleware.php(67): League\Route\Dispatcher->handle()
#10 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(59): JTL\Router\Middleware\UpdateCheckMiddleware->process()
#11 /usr/www/users/shopimn/includes/src/Router/Middleware/AuthMiddleware.php(55): League\Route\Dispatcher->handle()
#12 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(59): JTL\Router\Middleware\AuthMiddleware->process()
#13 /usr/www/users/shopimn/includes/vendor/league/route/src/Strategy/ApplicationStrategy.php(37): League\Route\Dispatcher->handle()
#14 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(59): Psr\Http\Server\MiddlewareInterface@anonymous->process()
#15 /usr/www/users/shopimn/includes/vendor/league/route/src/Dispatcher.php(53): League\Route\Dispatcher->handle()
#16 /usr/www/users/shopimn/includes/vendor/league/route/src/Router.php(111): League\Route\Dispatcher->dispatchRequest()
#17 /usr/www/users/shopimn/includes/src/Router/BackendRouter.php(310): League\Route\Router->dispatch()
#18 /usr/www/users/shopimn/admin/index.php(16): JTL\Router\BackendRouter->dispatch()
#19 {main}
thrown in /usr/www/users/shopimn/includes/src/Cache/Methods/CacheRedis.php on line 62
Diesen Fehler fixten wir im JTL Core File siehe Diff
Code:
shopimn@www545:~/public_html$ git diff includes/src/Cache/Methods/CacheRedis.php
diff --git a/includes/src/Cache/Methods/CacheRedis.php b/includes/src/Cache/Methods/CacheRedis.php
index f5e47e0d..a55ff834 100644
--- a/includes/src/Cache/Methods/CacheRedis.php
+++ b/includes/src/Cache/Methods/CacheRedis.php
@@ -35,7 +35,7 @@ class CacheRedis implements ICachingMethod
$res = $this->setRedis(
$options['redis_host'],
(int)$options['redis_port'],
- $options['redis_pass'],
+ (string)$options['redis_pass'],
$options['redis_user'] ?? null,
(int)$options['redis_db'],
$options['redis_persistent']