0
votes

I have an App Service deployed on three different regions (exact same code). My services needs to syncup some files at run-time and put them in the local cache of the app service.

For convenience, I have placed the files under the wwwroot folder. This is because when a new deployment happens, I want them to be gone too.

The thing is that in two of the three App Services, every time that a folder gets created under the wwwroot, the App Domain restarts and it breaks the functionality of the service. For the third service, the App Domain does not restart at all and requests to it work well. I know that changes in the wwwroot folder may trigger an App Domain recycle but don't get why it only happens in two of the regions.

Is there any configuration that might affect the behavior and how/when the App Domain gets restarted?

I also tried to add below on the web.config of my service but then the service doesn't even load up.

<httpRuntime fcnMode="Disabled" />

I got that information from this thread: Azure Websites AppDomain many restarts

1

1 Answers

1
votes

Deployment pretty much does only one thing: it deploys files into the wwwroot folder. It never directly does anything to restart the App.

This is true whether you use Visual Studio deployment (msdeploy), git/GitHub/etc deployment, FTP, or manually copy some files over using Kudu Console.

The key word above is directly, meaning the deployment doesn't make any magic API calls that cause a site restart. However, in some cases, the act of deploying files into wwwroot can cause some form of restart. In that sense, the deployment is indirectly causing a restart, but it really knows nothing about it. It's up to the Application's runtime to react to file change notifications and do what it thinks is right.

For more details, you could refer to this article.

You can optionally use the configSource attribute to reference external configuration files that do not cause a restart when a change is made. For more information, see configSource in General Attributes Inherited by Section Elements.