Health Check for WordPress on Azure App Service

Arunansu Pattanayak 97 Reputation points
2023-05-17T15:31:07.6133333+00:00

What should be the health prove path for WordPress on Azure App Service? I installed a plugin called Health Check & Troubleshooting and used the path /wwwroot/wp-admin/site-health.php that was created by the plugin. The plugin shows healthy in admin portal. The site is working fine. But the health check shows all instances Unhealthy. What should the health probe path be for app service health check to diagnose the status of the app properly?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-05-22T04:47:09.1133333+00:00

    Hi Arunansu , have you already enabled health check in the azure portal? if no, then set that up first by following the below steps:

    • To enable Health check, browse to the Azure portal and select your App Service app.
    • Under Monitoring, select Health check.
    • Select Enable and provide a valid URL path on your application, such as /health or /api/health the path /wwwroot/wp-admin/site-health.php path you created via the WP plugin
    • Select Save.

    User's image

    According to the docs: "When given a path on your app, Health check pings this path on all instances of your App Service app at 1-minute intervals. If an instance doesn't respond with a status code between 200-299 (inclusive) after 10 requests, App Service determines it's unhealthy and removes it. (The required number of failed requests for an instance to be deemed unhealthy is configurable to a minimum of two requests.)

    After removal, Health check continues to ping the unhealthy instance. If the instance begins to respond with a healthy status code (200-299) then the instance is returned to the load balancer. If an instance remains unhealthy for one hour, it will be replaced with new instance. When scaling out, App Service pings the Health check path to ensure new instances are ready."

    Hope that helps.

    0 comments No comments

  2. Arunansu Pattanayak 97 Reputation points
    2023-06-01T14:37:06.6466667+00:00

    I am using /site/wwwroot/wp-content/plugins/health-check/health-check.php as Health probe path in Azure portal. It shows instances as unhealthy. But the site is up and running. Maybe the health probe path is not right. What should the path be?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.