The New Relic PHP agent was previously reporting data but then stopped reporting. In addition:
- When you checked your agent daemon log file
/var/log/newrelic/newrelic-daemon.log, you saw the message
Lack of activity within 10ms.
- The health status for the application is grey.
- The option to delete the application appears in the application's Settings menu when you select the icon.
Use either of these methods to keep your application from entering an idle state:
- Set the timeout value for
newrelic.daemon.app_timeoutto at least twice the interval of your transactions. For example, for an hourly background job, set the timeout to two hours.
- Recommendation: If you have long or infrequent processes, run a cron job every five minutes with a simple transaction, such as
phpinfo(). This will help ensure the application does not enter an idle state.
Do not set
newrelic_ignore_transaction to ignore the cron job. The PHP agent will enter an idle state if the job does not run and report.
If an application's transactions take longer than ten minutes, or occur less frequently than once every ten minutes, the application enters and remains in an idle state.
When the PHP agent is in an idle state, two transactions must occur before it will start reporting again:
- The first transaction wakes up the daemon and re-establishes the connection to New Relic.
- The second transaction reports data to New Relic.
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.