-
Notifications
You must be signed in to change notification settings - Fork 67
Thousands of E_WARNING "Failed to open stream: No such file or directory" after upgrading from 10.17.0.7 to 10.18.0.8 #843
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
Comments
I have the feeling the SDK is somehow hooking into either Doctrine ORM, DBAL or Symfony Cache. |
We have caching enabled in Doctrine, it seems to be related with that: $configurator->extension(
'framework',
[
'cache' => [
'default_redis_provider' => 'redis_connection',
'pools' => [
'doctrine_metadata.cache' => [
'adapter' => 'cache.system',
],
'doctrine_query.cache' => [
'adapter' => 'cache.system',
],
'cache.local' => [
'adapter' => 'cache.adapter.filesystem',
],
],
],
],
);
$configurator->extension(
'doctrine',
[
'orm' => [
'entity_managers' => [
'default' => [
'metadata_cache_driver' => [
'type' => 'pool',
'pool' => 'doctrine_metadata.cache',
],
'query_cache_driver' => [
'type' => 'pool',
'pool' => 'doctrine_query.cache',
],
'result_cache_driver' => [
'type' => 'service',
// This is a custom result cache, that extends from \Doctrine\Common\Cache\Cache and stores in Redis.
'id' => CachePoolName::internalServiceId(CachePoolName::DOCTRINE_RESULT),
],
'second_level_cache' => [
'enabled' => true,
'log_enabled' => false,
],
],
],
],
],
); |
Hi @ruudk , thanks for engaging here. JIT in enabled automatically by PHP. Previously, PHP would disable it when it detected extensions hooking in to PHP the way that our agent did; however, now it no longer disables JIT with PHP agent 10.18. Would you be able to try your setup with 10.18 agent and with PHP JIT disabled to rule that out as a factor? |
I deployed 10.18.0.8 together with |
@ruudk Thanks for trying that out and updating us. Are you able to provide your opcache settings? |
|
No additional opcache jit settings? They are all default? |
No other opcache settings, we take the default settings from php:8.3.3-fpm-bookworm |
Ok, thank you. |
Same problem here, I think the problem is when the error handler gets overridden, like in https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php#L131 newrelic still reports these errors. |
@mvanduijker Prior to 10.18 any errors handled by custom error handlers like a framework's error handlers were hidden from the agent. Now PHP agent 10.18 sees all errors, regardless of what hander handled them (an enhancement in error detection) but does result in more errors being reported. |
Hi. Is NR treating this as a bug, or a new behaviour we need to get used to? Or is this undecided? Many Thanks |
@zsistla in this case the framework tries to suppress the errors / warnings because they are expected and then handled by themselves. How should frameworks do that otherwise? How can we ignore those messages if this is a feature and not a bug? |
Hi @mvanduijker, thank you for the question.
Now let's take symfony as an example as it's not suppressing so much as handling them based on loglevel.
So the above ERRORS were all considered worthy of recording; however, since they are handled by the symfony error handler none of them would be passed back to PHPs standard error handler aside from the errors that are always passed back to PHPs standard error handler (E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING). Previous to 10.18, if they were not handled by PHPs standard error handler, they were hidden from the agent, even the ones the symfony error handler found worthy of recording. With PHP agent 10.18+, all errors are visible to the agent, but the side effect you are seeing is that more errors are being recorded. The agent does have an INI setting that specify what errors to record. |
So what does that mean, that all NR PHP SDK customers need to manually exclude these errors that are normally not visible? I believe NR should handle this in the Symfony integration. And not bother users with it. |
I'm seeing the same issue with the Smarty Template Engine. I don't want to set |
We're having the same issue with Laravel framework, since the upgrade we're receiving E_WARNING AND E_DEPRECATION even though they are set to be ignored in the php.ini. Already tried to suppress it from the framework side but no success. Differently than @ssigwart 😅 I just set |
@zsistla I think I was not really clear. |
One thing that I started to wonder is, @zsistla says
But shouldn't new relic respect the configuration on |
We've downgraded to the 10.17.0.7 agent for now, having handled warnings recorded as errors is quite a nuisance and unwanted behaviour. For Red Hat (yum) based distros you can use the versionlock plugin to lock the agent to 10.17.0.7: yum install -y yum-plugin-versionlock
yum versionlock newrelic-daemon-10.17.0.7-1.x86_64 \
newrelic-php5-10.17.0.7-1.x86_64 \
newrelic-php5-common-10.17.0.7-1.noarch |
I agree, but also think it should also take into account things custom error handles suppress. I have |
Thanks for all the feedback in this thread. We are continuing to investigate the issues and usage cases that are detailed here and the more details you provide the more we can work to resolve the problems. A few notes:
Yes, this is a separate issue with a fix that will go out in the next release
|
Fixed with 10.19.0.9 release: https://github.com/newrelic/newrelic-php-agent/releases/tag/v10.19.0.9 |
Just tried it out and it does indeed fix the problem. Thanks everyone 💪 💙 |
I just tried it out too, but I'm still seeing lots of reported errors from the Smarty template engine. The biggest sources of errors are :
The library has this error handler that should be suppressing these: |
Sorry for the confusion. This did fix it. Thank you. It looks like the yum update didn't see the new package on a handful of our servers and those were the ones I was seeing errors from. |
Description
We bumped from 10.17.0.7 to 10.18.0.8 and noticed lots of E_WARNING errors being reported:
Steps to Reproduce
I don't know
Expected Behavior
No warning.
Relevant Logs / Console output
Your Environment
Symfony v7.0
PHP 8.3.2
Debian 12
The text was updated successfully, but these errors were encountered: