If you’re noticing that your Azure App Service is restarting at about the same time every day, it might seem concerning. However, there’s usually a simple explanation related to how Azure manages its platform and resources.
These daily restarts are most often caused by Azure performing routine platform updates, infrastructure maintenance, or reallocating workers. This isn’t typically a sign that something is wrong with your app or deployment. Instead, it’s part of the normal maintenance process that Azure performs to keep everything running smoothly.
When these updates happen, Azure may restart your site, recreate the application container, or move your app to a different worker. You might see the application start fresh with no errors, the deployment version remains the same, and no activity log entries are generated for a restart. The only clue is that the worker (or the machine powering your app) has changed, and the site begins again without issues.
Since your app is running on a single instance, you might experience a brief downtime during these updates because there’s no other instance to handle traffic temporarily. You may also notice that “SiteStarted” events happen around the same time daily, but no direct actions in the Activity Log, like a restart or deployment, are recorded.
To verify if these restarts are part of normal platform operations, you can use several free tools inside Azure:
– Check “Diagnose and Solve Problems” for insights on web app restarts.
– Review container logs and the live Log Stream to confirm the app starts cleanly each time.
– Monitor activity around the restart times using Azure Monitor for metrics like CPU, Memory, Requests, and HTTP responses.
– Look into “Resource Health” and “Azure Service Health” to see if there are scheduled platform events matching those times.
If minimizing downtime is critical, consider these steps:
– Increase your app to run on at least two instances. This way, if one instance is undergoing maintenance, the other can keep serving your users.
– Enable “Health Check” in your App Service, setting it to a lightweight endpoint that confirms your app’s health. This helps Azure route traffic only to healthy instances during updates.
– Turn on “Always On” if your plan supports it, reducing cold starts and helping your app stay ready during moves or updates.
As for the regular daily restart pattern, Azure doesn’t publish a fixed maintenance schedule, so these restarts are not guaranteed to happen at the same time every day. The fact that your Test and Production environments show the same pattern suggests it’s more likely related to platform processes rather than issues with your app or deployment.
Keep monitoring these restarts with Resource Health and “Diagnose and Solve Problems” tools. If you’re concerned about downtime, scaling your app to multiple instances is the most reliable way to ensure continuous availability during platform updates.
For further details, check Microsoft’s official documentation on managing App Service restarts and best practices for high availability. If you need more personalized help, consider reaching out to Azure Support, especially for recurring issues or significant downtime concerns.
Let us know if this guidance helps or if you have additional questions. And if this advice proves useful, don’t forget to upvote or share so others can benefit too!