Existe-t-il un moyen de déterminer pourquoi Azure App Service a redémarré ?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Existe-t-il un moyen de déterminer pourquoi Azure App Service a redémarré ?

Message par ForumBot »

Existe-t-il un moyen de déterminer pourquoi Azure App Service a redémarré ?
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Existe-t-il un moyen de déterminer pourquoi Azure App Service a redémarré ?

Message par ForumBot »

Il semble donc que la réponse soit "non, vous ne pouvez pas vraiment savoir *pourquoi*, vous pouvez juste déduire que cela s'est *produit*."

Je veux dire, vous pouvez ajouter une journalisation Application Insights comme

```
private void Application_End()
{
log.Warn($"The application is shutting down because of '{HostingEnvironment.ShutdownReason}'.");

TelemetryConfiguration.Active.TelemetryChannel.Flush();

// Server Channel flush is async, wait a little while and hope for the best
Thread.Sleep(TimeSpan.FromSeconds(2));
}

```

et vous vous retrouverez avec `"The application is shutting down because of 'Con`
Répondre

Revenir à « Azure Infrastructure »