New Relic warning: the Xdebug extension prevents the New Relic agent from gathering errors. No errors will be recorded
Asked Answered
C

2

7

In /var/log/newrelic/php_agent.log on my servers I see lines like this:

2013-08-30 16:05:01.444 (15615/child) warning: the Xdebug extension prevents the New Relic agent from gathering errors. No errors will be recorded.

Yet, I still see [at least some] PHP errors in New Relic. What's going on? Is this warning a bug in New Relic?

I also found this which says:

If you are using xdebug, you will have a warning about this. So you could turn off Xdebug , or write your own handler and call New Relic API to allow errors report into New Relic properly. See the comments of Kris Weltz for more information.

The words "Kris Weltz" link to a missing document.

Here's what I've got installed:

# rpm -qa | grep relic
newrelic-php5-common-3.7.5.7-1.noarch 
newrelic-php5-3.7.5.7-1.x86_64 
newrelic-repo-5-3.noarch 
newrelic-daemon-3.7.5.7-1.x86_64 
newrelic-sysmond-1.2.0.257-1.x86_64
Consistent answered 3/9, 2013 at 23:6 Comment(0)
C
7

I got help from New Relic support.

Their response was basically that Xdebug indeed conflicts with New Relic, and they should not be used simultaneously. Uninstalling the Xdebug PHP extension made the warning go away.

It may be possible to disable stack traces in Xdebug and continue to use other Xdebug features, but New Relic support didn't comment on this.

Consistent answered 3/9, 2013 at 23:6 Comment(0)
C
0

Instead of uninstalling extension you can also disable xdebug extension loading in the .ini files. I use docker, so in the docker container where docker agent runs.

In

  1. In /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini comment following line: zend_extension=xdebug
  2. Also, in /usr/local/etc/php/conf.d/xdebug.ini comment following line: zend_extension=xdebug.so
  3. Restart PHP service or docker container.

If the .ini paths does not match to yours, running php --ini command will list all the .ini files that it uses.

This solution worked for me.

Cambodia answered 10/2, 2022 at 16:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.