-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Monolog\Logger::getLevelName() ConsoleHandler given #1783
Comments
Some extra info: this issue happens with both PHP 8.1.2 and PHP 8.1.13. So it seems like an opcache related bug.. |
good tip ! that makes sense |
Has anyone got a reduced reproduce case already for this? It would likely need hammering with |
Could anyone affected try if upgrading symfony/monolog-bundle to 3.x-dev fixes it? I'm wondering if symfony/monolog-bundle#446 might help as it stops doing level resolution in the container build. In theory the old code was fine but who knows. Opcache bugs can be hard to pinpoint. |
Thanks @Seldaek for pointing to that fix. Unfortunately it's hard to test a dev version in production for us. I will try enabling opcache again when monolog-bundle gets a new release. |
Monolog version 2 & 3
Since upgrading to Symfony 6.1 (and PHP 8.1), I have been seeing a very rare Symfony container construction issue within the Monolog code. The error is logged by PHP-FPM to nginx:
This error only gets triggered once every 500 requests.
The code is deployed using docker to multiple hosts (ubuntu 22.04 host and container), and the same rare issue happens on multiple hosts.
When looking at the monolog Logger.php code, it seems impossible that a
pushHandler
will trigger agetLevelName
, and even more will cause aConsoleHandler
to be given as level argument.But still this is the only issue I'm seeing, with the exact same trace every time.
Is this a bug within Monolog? Are there any similar issues known?
The text was updated successfully, but these errors were encountered: