@Hari Krishnamurthy ,
Just following-up on this, hope you had got a chance to see the previous responses. If the answer helped (pointed you in the right direction) > please click Accept Answer.
As Sunoj mentioned, please check the App Service Diagnostics for pointers to fetch more info on the restart/webapp automatic stop.
Just adding more info, Azure App Service Web Apps are automatically stopped after a certain period of inactivity.
If you are experiencing frequent restarts, it could be due to a number of reasons such as:
- Your WebApp is running on a free or shared tier, which have lower resource limits and are more likely to be stopped due to inactivity.
- Your WebApp is running on an App Service plan (ASP) that is under heavy load and is being recycled frequently.
- Your WebApp is experiencing issues that are causing it to crash or become unresponsive.
-To troubleshoot the issue, you may check the logs for your web app to see if there are any errors or warnings that could be causing the restarts.
-You may also try scaling up your App Service plan to a higher tier to see if that resolves the issue.
Checkout the log directory/location information -here - Access log files
Azure Web Apps: “Error 403 – This web app is stopped.”