Frequent "Container Stopped" Alerts in App Service for Node.js Container (App Works Fine)

Vivin Kumar 40 Reputation points
2025-07-10T10:45:48.5766667+00:00

Hi Team,

I'm currently running a Node.js application on Azure App Service (Linux) using a custom Docker container. I’ve noticed that I frequently receive alerts indicating "Container stopped", but my application continues to work normally without any visible issues or downtime.

Here are some key points:

  • App Service Plan Metrics: CPU, memory, and other metrics appear normal.

Application Logs: No crash or failure is observed in the logs.

"Always On" Setting: Enabled in the General Settings of the App Service.

Health: From the user perspective, the app is fully functional, and there are no reported outages.

Despite this, the frequent container stop events are concerning, especially for monitoring and SLA reporting.

Questions:

What could be causing these container stop alerts even though the app continues to run fine?

Is this an expected behavior (e.g., related to scaling, image update checks, or platform-level maintenance)?

How can I further investigate or prevent this from happening?

Any insights or suggestions would be greatly appreciated.

Thanks in advanceimage

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


Answer accepted by question author
Bhargavi Naragani 7,640 Reputation points Moderator
2025-07-15T09:28:44.47+00:00

Hi Vivin Kumar, Sure we'll consider your colleague's query

Lee Lingesh, Thanks for checking the App Service logs and sharing the Kudu message:

Result: Kudu: XXXX-saas-stg-xxxxx-xxxx-as__b8aa stopped.

This message generally indicates that the container or instance was stopped, either due to a platform-initiated event, a configuration change, or an internal app rule like Auto-Heal. Since your logs and metrics look fine and you confirmed that there’s no CI/CD trigger or high resource usage, here are the most likely root causes and how to further investigate them:

Azure App Service can automatically restart your app or container if certain conditions are met (e.g., slow requests, memory leaks, HTTP errors). These triggers don’t always show up in the Activity Log.

To check:

  • Go to your App Service in Azure Portal
  • Navigate to Diagnose and solve problems => Availability and Performance => Auto-Heal
  • Review any custom auto-heal rules configured
  • Disable or adjust them if needed Auto-Heal feature in Azure App Service

Sometimes, Azure may silently restart an instance as part of routine infrastructure maintenance, container image refresh, or proactive performance management. These reboots might not always be visible in the Activity Log but are part of how Azure ensures high availability.

You can confirm this by reviewing the Web App restart history:

If you've configured a Health Check endpoint, even brief failures (like high latency or a missed 200 OK) can cause Azure to stop and restart the container. Ensure the endpoint is reliable and fast, especially under load. Configure Health Check in App Service

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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