Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should an Azure website be restarted, and what are the consequences?

In the Azure Management Portal, you can configure your website. As an example, you can change the PHP version your website is using. When you have edited a configuration option, you have to click “Save”.

So far, so good. But you also have the option to restart your site (by clicking “Restart“ next to “Save”).

My question is, when should you restart your website? Are there some configuration changes that require a restart, and others that don't? I haven't found any hints in the user interface.

Are there other situations that require a restart? Say, the website has been running for a given time without a restart?

Also, what are the consequences of restarting a website? Does it affect cookies/sessions in any way (i.e. delete a user's shopping cart or log them out)? Are there any other consequences I should be aware of?

like image 805
Yngve Høiseth Avatar asked Feb 13 '15 11:02

Yngve Høiseth


People also ask

What is auto heal in Azure?

Auto-healing is a mitigation action you can take when your app is having unexpected behavior. You can set your own rules based on request count, slow request, memory limit, and HTTP status code to trigger mitigation actions. Use the tool to temporarily mitigate an unexpected behavior until you find the root cause.

How do I turn on Always on Azure App Service?

05 On the General settings panel, under Platform settings, select On next to Always on configuration setting to enable the Always On feature for the selected Azure App Services web application. Click Save to apply the changes.


1 Answers

Generally speaking, you may want to restart your website because of application performance issues. For example, you may have a memory leak in your application, connections not getting closed, or other things that would degrade the performance of the application over time. As you monitor your website and observe conditions like this you may make a decision to restart it. Even better, you may even automate the task of restarting when these conditions occurr. Anyway, these kinds of things are not unique to Azure Websites. You would take similar actions for a website running on-premises.

As for configuration changes, if you make a change to your web.config file, this change is detected and your website would be restarted automatically for you. Similarily, if you were to make configuration changes in the CONFIG page of your website in the Azure Management Portal such as application settings, connection strings, etc., then Azure Websites will detect this change to your environment and automatically restart it.

Indeed, restarting a website will result in any session data kept in memory being lost for that instance. Additionally, if you have startup/initialization code that takes time to complete then that will have to be rerun. Again, this is not anything unique to Azure Websites though.

like image 55
Rick Rainey Avatar answered Sep 21 '22 00:09

Rick Rainey