No data appears (PHP)

This discusses some scenarios and reasons that data may not be appearing in your dashboard with the PHP agent.

Possible causes

Read through the following causes for possible investigations and solutions to help resolve the problem.

After installing the New Relic PHP agent and sending requests to your app, no data appears

Solution

Data should appear in New Relic APM within two to three minutes after agent installation. If no data appears after a few minutes, try the following steps to diagnose the problem:

  1. Restart your web server (Apache, Nginx, PHP-FPM, etc.), then wait a few minutes for data to appear.
  2. Check your phpinfo() to verify that New Relic is installed and the license key is available.
  3. Verify that the daemon is running.
  4. Verify that both the agent and the daemon are writing to their log files.
  5. Verify whether you are using a non-standard version of PHP (one not supplied directly with your OS distribution that the install script did not detect).
After updating PHP the agent stopped working
See Agent stops after updating PHP.
The New Relic PHP agent started reporting data for your long running process but stopped

Cause

Check your agent daemon log file /var/log/newrelic/newrelic-daemon.log and look for the message lack of activity within 10m0s. If present, this indicates that the agent did not receive any traffic for the application so it put itself into an idle state.

This is a feature designed to change the state of the agent to allow the application to be deleted from the UI if it is no longer reporting. The traffic light for the application will appear grey and the option to remove it from the dashboard will appear.

If an application's transactions take longer than ten minutes, or occur less frequently than once every ten minutes, the application will enter and remain in a constant idle state. This happens because a single transaction during the idle state will only reestablish connection with New Relic, rather than report data for that transaction. It takes a total of two transactions to start reporting again. The first transaction will wake up the agent and reestablish the connection to New Relic. The second transaction will be the first transaction reported in the dashboard.

Solution

A possible solution is to ensure that the application does not enter the idle state. This can be done by running a cron job every five minutes with a simple transaction, such as phpinfo(). This will keep the agent active and monitoring any live transactions. Unfortunately, setting `newrelic_ignore_transaction` to stop reporting that transaction will not help. The the agent will still enter the idle state.

For more help

Additional documentation resources include PHP Agent Troubleshooting (individual topics describing common problems, causes, and solutions for your PHP agent installation).

Join the discussion about PHP in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.