• /
  • Log in
  • Free account

Install New Relic PHP agent in GAE flexible environment

With New Relic APM's PHP agent, you can monitor applications that reside in the Google App Engine (GAE) flexible environment. Adding New Relic to your GAE flex app gives you insight into the health and performance of your app and extends GAE with metrics you can view in New Relic APM, Browser, and Insights.

This document explains how to add New Relic to your GAE flex app by configuring a custom runtime, and gives an example of deploying a PHP app with Docker.


The New Relic PHP agent can run in a GAE flexible environment using a custom runtime. Due to limitations of other environments, do not use the GAE standard environment or Google App Engine's "native mode" installation.

Build a custom runtime using Docker

See Google's documentation for building custom runtimes. This example describes how to add New Relic to your GAE flex app by installing the New Relic PHP agent, building a custom runtime, and deploying a single PHP application via Debian. For best results with the GAE flex environment, always use Debian.

For more information about deploying and configuring your PHP app in the GAE flexible environment, see:

Optional: Disable health checks

Google App Engine sends periodic health check requests to confirm that an instance has been successfully deployed, and to check that a running instance maintains a healthy status. A health check is an HTTP request to the URL /_ah/health.

If you create a custom runtime, your app must be able to handle a large number of health check requests. Otherwise, your app data may not display correctly in New Relic APM.

If you notice performance issues, disable GAE health checks. In your app.yaml, add:

enable_health_check: False

Get New Relic agent troubleshooting logs from GAE

Use these resources to troubleshoot your GAE flex environment app:

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.