什么可以导致IIS应用程序重置?

Joh*_*ore 4 iis session web-applications session-timeout

我正在使用healthMonitoring部分监控我的网站.我看到一条消息......

Event code: 1002 
Event message: Application is shutting down. Reason: Hosting environment is shutting down. 
Event time: 8/8/2011 3:29:59 PM 
Event time (UTC): 8/8/2011 8:29:59 PM 
Event ID: 6879adf29cdc403ba8ad2e5694b6cee0 
Event sequence: 730 
Event occurrence: 1 
Event detail code: 50002 
Run Code Online (Sandbox Code Playgroud)

我无法确定它为什么会被关闭.我的应用程序池设置为每24小时重置一次.我的web.config会话设置为在4小时后过期(这不应该影响应用程序关闭).我看到一些帖子提到healthMonitoring设置可以重置一个应用程序,但我没有看到任何特定的设置会这样做.另外,在添加healthMonitoring部分之前,我注意到了这个问题.

仅供参考,以下是它的读取方式......

    <healthMonitoring>
        <bufferModes>
            <add name="Critical Notification" maxBufferSize="100" maxFlushSize="20"
                    urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00"
                    maxBufferThreads="1" />
            <add name="Notification" maxBufferSize="300" maxFlushSize="20"
                    urgentFlushThreshold="1" regularFlushInterval="Infinite" urgentFlushInterval="00:01:00"
                    maxBufferThreads="1" />
            <add name="Analysis" maxBufferSize="1000" maxFlushSize="100"
                    urgentFlushThreshold="100" regularFlushInterval="00:05:00"
                    urgentFlushInterval="00:01:00" maxBufferThreads="1" />
            <add name="Logging" maxBufferSize="1000" maxFlushSize="200" urgentFlushThreshold="800"
                    regularFlushInterval="00:30:00" urgentFlushInterval="00:05:00"
                    maxBufferThreads="1" />
        </bufferModes>

        <providers>
            <add name="EventLogProvider" type="System.Web.Management.EventLogWebEventProvider,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
            <add connectionStringName="LocalSqlServer" maxEventDetailsLength="1073741823"
                    buffer="false" bufferMode="Notification" name="SqlWebEventProvider"
                    type="System.Web.Management.SqlWebEventProvider,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
            <add name="WmiWebEventProvider" type="System.Web.Management.WmiWebEventProvider,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" />
        </providers>

        <profiles>
            <add name="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00"
                    custom="" />
            <add name="Critical" minInstances="1" maxLimit="Infinite" minInterval="00:00:00"
                    custom="" />
        </profiles>

        <rules>
            <add name="All Errors Default" eventName="All Errors" provider="EventLogProvider"
                    profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00"
                    custom="" />
            <add name="Failure Audits Default" eventName="Failure Audits"
                    provider="EventLogProvider" profile="Default" minInstances="1"
                    maxLimit="Infinite" minInterval="00:01:00" custom="" />
            <add name="Application Lifetime Events Default"
                     eventName="Application Lifetime Events"
                     provider="EventLogProvider"
                     profile="Default"
                     minInstances="1"
                     maxLimit="Infinite"
                     minInterval="00:01:00"
                     custom="" />
        </rules>

        <eventMappings>
            <add name="All Events" type="System.Web.Management.WebBaseEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Heartbeats" type="System.Web.Management.WebHeartbeatEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Application Lifetime Events" type="System.Web.Management.WebApplicationLifetimeEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Request Processing Events" type="System.Web.Management.WebRequestEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Infrastructure Errors" type="System.Web.Management.WebErrorEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Request Processing Errors" type="System.Web.Management.WebRequestErrorEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="All Audits" type="System.Web.Management.WebAuditEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Failure Audits" type="System.Web.Management.WebFailureAuditEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
            <add name="Success Audits" type="System.Web.Management.WebSuccessAuditEvent,System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
                    startEventCode="0" endEventCode="2147483647" />
        </eventMappings>

    </healthMonitoring>
Run Code Online (Sandbox Code Playgroud)

什么可能导致我的应用程序重置?

谢谢!

小智 8

IIS可以重置/重启,原因有很多.
来自Tess Ferrandez 博客

  • 修改了Machine.Config,Web.Config或Global.asax
  • bin目录或其内容已修改
  • 重新编译的次数(aspx,ascx或asax)超出了machine.config或web.config中设置指定的限制(默认情况下,此值设置为15)
  • 修改虚拟目录的物理路径
  • CAS策略已修改
  • Web服务重新启动
  • (仅限2.0)删除应用程序子目录

如果应用程序处于空闲状态(默认为20分钟无活动),则会关闭应用程序,消耗太多内存或CPU时间.
此外,在Web服务器上运行的防病毒程序被指责用于重置iis,我假设通过触摸上面提到的任何文件/目录.