This release of the PHP agent automatically marks Drupal cron requests as background tasks, improves the categorization of PHP errors within the New Relic UI, and fixes several bugs. Additionally, the internals of the agent have been significantly refactored to improve the stability and performance of the agent.
Treat Drupal cron requests as background tasks
Drupal cron requests (identified by calls to
drupal_cron_run()) will now be counted as background tasks (not web transactions) regardless of how they are started. Previously, it was necessary to use the
newrelic_background_job()API to explicitly mark Drupal cron requests as background tasks.
Use the exception class as the category for errors
Errors created using the
newrelic_notice_error()API function with an exception will be grouped according to the exception's class. Previously, all errors were grouped under 'NoticedError'.
Limit the maximum number of nested PHP function calls
The agent will now limit the maximum number of nested function calls within PHP applications. This is to provide protection against stack overflows due to infinite recursion. Previously, this would result in a segmentation fault. The agent will now log an error and terminate the process by raising a fatal PHP error. By default, this limit is set to a very high value of 500. Exceeding this limit should be extremely rare.
Improve the stability and performance of the agent
The internals of the agent and its background daemon process have been significantly refactored to improve interprocess communication, stability and performance. The maximum number of connections to the background daemon process has been doubled to 4096.
Fix for installing on Ubuntu 13.10 when using PHP-FPM
Previously the installer would fail to install a newrelic.ini file in the configuration directory for PHP-FPM (/etc/php5/fpm/conf.d), if one was present. This has been fixed, and the installer will correctly install a newrelic.ini for CLI, DSO and FPM configuration directories.
NULLunder PHP 5.5
Version 126.96.36.199 added support for external calls made using
drupal_http_request(). Due to the way the agent instruments this function under PHP 5.5, this function would always return
NULLinstead of the correct return value. This has been fixed.
Fix for real user monitoring when a Content-Length response header is present.
Fixed a segmentation fault when Zend Thread Safety is enabled.
Attempts to use the agent under Apache using a threaded MPM (e.g. worker or event) and mod_php would result in segmentation faults. This has been fixed, but New Relic does not recommend using the agent in these circumstances.
Fixed high CPU usage under heavy load
Under very high loads with thousands of PHP processes, the background daemon process could consume 100% CPU when the per-process file descriptor limit was exceeded. This has been fixed. The agent will now throttle the number of new connections accepted when per-process file descriptor limit is reached. A message is also printed to the log file.