We have a couple of Wordpress sites. Pretty standard configuration with the boilerplate generated using Bedrock and deployed using Trellis on AWS EC2.
With the NewRelic PHP Agent installed and enabled, the HTTP requests toward the Wordpress built-in REST API endpoints would randomly crash the php-fpm workers and return 502 bad gateway errors. The chance of that happening is probably around 1 in 20 or so.
Other regular web pages that return HTML are somehow not affected, only the REST API endpoints that return JSON.
When I disable the NR agent from the php conf, the issue would be gone.
I’ve also tried setting newrelic.browser_monitoring.auto_instrument
to false
, but it didn’t help.
Not much information can be found in the error logs. The log that indicates a crash is found here /var/log/apport.log
ERROR: apport (pid 2046127) Fri Apr 29 19:59:10 2022: called for pid 2045950, signal 11, core limit 0, dump mode 2
ERROR: apport (pid 2046127) Fri Apr 29 19:59:10 2022: not creating core for pid with dump mode of 2
ERROR: apport (pid 2046127) Fri Apr 29 19:59:10 2022: executable: /usr/sbin/php-fpm7.4 (command line "php-fpm:\ pool\ wordpress")
ERROR: apport (pid 2046127) Fri Apr 29 19:59:10 2022: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment
ERROR: apport (pid 2046127) Fri Apr 29 19:59:10 2022: apport: report /var/crash/_usr_sbin_php-fpm7.4.0.crash already exists and unseen, doing nothing to avoid disk usage DoS
I can provide the dump file if it’s useful.
=============
Please provide information on your environment, and any further information you believe is relevant, such as the below:
- APM Agent Language: PHP 7.4
- APM Agent Version: 9.20.0.310 (“allium” - “952b9f129ea0”)
- Operating System: Ubuntu
- Operating System Version: 20.04.2 LTS
- Frameworks your app is using: Wordpress 5.9.2
- A link to the application in the New Relic UI. https://one.newrelic.com/nr1-core/apm-features/overview/MTUwMDkzMXxBUE18QVBQTElDQVRJT058MTQyMjAwNTYxMw
Additional Resources
Please run New Relic Diagnostics on your applications and share the results here.
[REDACTED BY NEW RELIC]