Reputation: 32068
Is there any way of simply rebooting the VM in which a site resides?
Had an issue today where git deploying a code change to our site resulted in:
D:\home\site\repository\packages\Microsoft.Net.Compilers.1.0.0\tools\Microsoft.CSharp.Core.targets(67,5): error MSB6006: "csc.exe" exited with code -1073741819. [D:\home\site\repository\Foo\Bar.csproj]
Eventually after killing VBCSCompiler.exe in the Kudu/SCM site Process Explorer and issuing a Redeploy from the portal, resulted in a successful deployment ... but then the site wouldn't spin up correctly: in EventLog.xml there was
HttpCompileException: External component has thrown an exception.
at System.Web.Compilation.AssemblyBuilder.Compile()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrecompiledApp)
at System.Web.Compilation.BuildManager.CompileGlobalAsax()
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
So something pretty fundamental wasn't well with the environment.
The only thing that fixed it was choosing a different App Service plan/pricing tier in the portal which then seems to result in the sites spinning up in a new VM (we noticed that %COMPUTERNAME%
changed).
Is there a better way to get a new VM instance than randomly swapping between different pricing tier every time this happens?
Upvotes: 1
Views: 1823
Reputation: 24636
You already have all the answers, but to summarize:
You can't directly restart the VM a site runs on. But you can do two things instead:
Upvotes: 3
Reputation: 1805
You can try restarting the site right from the Azure Portal on the Web App management blade.
Upvotes: 3