在Azure网站禁用池回收 [英] Disable pool recycling on Azure Websites

查看:282
本文介绍了在Azure网站禁用池回收的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经部署在Azure上的网站一个网站,我想禁用池回收。

I have a website deployed on Azure Websites and I want to disable pool recycling.

如果您有一个普通IIS的安装,你可以在应用程序池高级设置中设置禁用此。回收 - >禁用重叠再循环为真。

If you have a regular IIS installation, you can disable this in application pool advanced settings by setting "Recycling -> Disable overlapped recycle" to true.

但我似乎无法找到在蔚蓝的管理控制台这个选项,况且我在网上找到关于这个问题的任何信息。

Yet I can't seem to find this option in the azure management console, nor do I find any information on this subject online.

任何指针将大大AP preciated!

Any pointers would be greatly appreciated!

推荐答案

非常感谢普尼特·古普塔指着我在正确的方向!
我无法用确切的解决方案,但它让我在正确的道路上。

Thanks a lot Puneet Gupta for pointing me in the right direction! I couldn't use the exact solution, but it set me on the right path.

下面是我如何解决这样的:

Here's how I solved this:

1)让您的双手上的applicationHost.config。
最简单的方法是通过单片机通过控制台文件走出去,然后按照JSON的链接。
最后,你会在这里结束:<一href=\"https://YOUR_WEBSITE_NAME.scm.azurewebsites.net/api/vfs/LocalSiteRoot/Config/applicationhost.config\" rel=\"nofollow\">https://YOUR_WEBSITE_NAME.scm.azurewebsites.net/api/vfs/LocalSiteRoot/Config/applicationhost.config

1) Get your hands on the applicationHost.config. The easiest way is going through the SCM Console via "files" and then follow the links in json. In the end, you end up here: https://YOUR_WEBSITE_NAME.scm.azurewebsites.net/api/vfs/LocalSiteRoot/Config/applicationhost.config

2)确定重叠再循环的当前状态。
在applicationHost.config文件,寻找applicationPools元素
它应该是这样的:

2) Identify the current status of overlapped recycle. In the applicationHost.config file, look for the "applicationPools" element It should look like this:

<applicationPools>
  <add name="YOUR_SITE_NAME" managedRuntimeVersion="v4.0">
    <processModel identityType="ApplicationPoolIdentity" />
  </add>
  <add name="~1YOUR_SITE_NAME" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated">
    <processModel identityType="ApplicationPoolIdentity" />
  </add>
</applicationPools>

如果你看到这一点,那么重叠的回收是的已启用
你不能直接写入到该文件幸好微软给了我们改造它的威力!

If you see this, then overlapped recycle is ENABLED! You can't write directly to this file but fortunately microsoft gives us the power to transform it!

3)转换它!
您可以通过放置一个applicationHost.xdt文件在你的网站上(请注意本身部署在/网站/ wwwroot目录的网站,所以你applicationHost.xdt转换必须驻留在的/站点目录转换applicationHost.config文件在哪里你的网站是父文件夹。
如果要禁用重叠回收,那么这就是你放什么在文件中:

3) Transform it! You can transform the applicationHost.config file by placing an applicationHost.xdt file in the /site directory of your website (mind you that the website itself is deployed in the /site/wwwroot directory, so your applicationHost.xdt transform must reside in the parent folder of where your website is. If you want to disable overlapped recycle, then this is what you put in the file:

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">>
  <system.applicationHost>
    <applicationPools>
      <add name="YOUR_SITE_NAME" xdt:Locator="Match(name)">
        <recycling disallowOverlappingRotation="true" xdt:Transform="Insert" />
      </add>
      <add name="~1YOUR_SITE_NAMEd" xdt:Locator="Match(name)">
        <recycling disallowOverlappingRotation="true" xdt:Transform="Insert" />
      </add>
    </applicationPools>
  </system.applicationHost>
</configuration>

4)重新启动站点
最后你需要重新启动你的网站已应用的转换。
重新启动后,再去步骤1,您现在应该看到这个代替:

4) restart the site finally you need to restart your site to have your transformations applied. After restart, go to step 1 again and you should now see this instead:

<applicationPools>
  <add name="YOUR_SITE_NAME" managedRuntimeVersion="v4.0">
    <processModel identityType="ApplicationPoolIdentity" />
    <recycling disallowOverlappingRotation="true" />
  </add>
  <add name="~1YOUR_SITE_NAME" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated">
    <processModel identityType="ApplicationPoolIdentity" />
    <recycling disallowOverlappingRotation="true" />
  </add>
</applicationPools>

等瞧:重叠回收现在在你的网站上蔚蓝禁用

et voila: overlapped recycle is now disabled on your azure website.

这篇关于在Azure网站禁用池回收的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆