Since a few "weeks" we sometimes have a strange behavior in our error reports which lead to a full stop of the webserver.
NOTICE: PHP message: PHP Fatal error: Uncaught TypeError: array_values(): Argument #1 ($array) must be of type array, null given in /var/www/html/vendor/yiisoft/yii2/di/Container.php:403
The full stack trace:
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#0 /var/www/html/vendor/yiisoft/yii2/di/Container.php(403): array_values()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#1 /var/www/html/vendor/yiisoft/yii2/di/Container.php(170): yii\di\Container->build()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#2 /var/www/html/vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container->get()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#3 /var/www/html/vendor/yiisoft/yii2/di/ServiceLocator.php(137): yii\BaseYii::createObject()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#4 /var/www/html/vendor/yiisoft/yii2/base/Module.php(766): yii\di\ServiceLocator->get()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#5 /var/www/html/vendor/yiisoft/yii2/web/Application.php(151): yii\base\Module->get()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#6 /var/www/html/vendor/yiisoft/yii2/base/Application.php(345): yii\web\Application->getErrorHandler()"
[12-Jan-2023 08:04:28] WARNING: [pool www] child 17499 said into stderr: "#7 /var/www/html/vendor/yiisoft/yii2/base/Application.php(202): yii\base\Application->registerErrorHandler()"
This problems happens on EVERY request, no matter what path and query params and starts suddenly. When we restart the webservers docker image (its used on a k8s cluster), everything starts to work again as expected. I actually don't thinks its a Yii Problem, it sounds more like a Webserver/PHP/OpCache issue. But i maybe someone else got the same or is looking for the same error by googling, so i decided to post this here.
I assume its important to mention:
We use PHP 8.1
Opcache settings are "strong", so it won't clear opcache until a webserver reload (this is also what might indicate the problem... PHP Bug?)
Hi everyone
Since a few "weeks" we sometimes have a strange behavior in our error reports which lead to a full stop of the webserver.
The full stack trace:
This problems happens on EVERY request, no matter what path and query params and starts suddenly. When we restart the webservers docker image (its used on a k8s cluster), everything starts to work again as expected. I actually don't thinks its a Yii Problem, it sounds more like a Webserver/PHP/OpCache issue. But i maybe someone else got the same or is looking for the same error by googling, so i decided to post this here.
I assume its important to mention:
So maybe someone which is more into the Yii Di-Container might have a hint, what could have gone wrong with the request so i can further debug.