【发布时间】:2011-10-11 06:30:22
【问题描述】:
谁触发了这个事件?在<healthMonitoring enabled="true" heartbeatInterval="30"> 中启用它有什么后果/好处,除了它每 30 秒出现在日志中?跟NLB心跳有关系吗?什么间隔更适合生产使用?
【问题讨论】:
标签: asp.net diagnostics health-monitoring
谁触发了这个事件?在<healthMonitoring enabled="true" heartbeatInterval="30"> 中启用它有什么后果/好处,除了它每 30 秒出现在日志中?跟NLB心跳有关系吗?什么间隔更适合生产使用?
【问题讨论】:
标签: asp.net diagnostics health-monitoring
在 web.config 中以这种方式启用它会导致应用程序域定期(在您的情况下每 30 秒)引发WebHeartbeatEvent,主要是为了检查您的应用程序是否“仍然存在”(例如检查人类的心跳)。您可以像这样指定其他规则:
<healthMonitoring enabled="true" heartbeatInterval="100">
<rules>
<add name="Heart Beat Events"
eventName="Heartbeats"
provider="EventLogProvider"
profile="Default"
minInterval="00:01:00" />
</rules>
</healthMonitoring>
指定 'EventLogProvider' 将导致事件被记录到 EventLog 中,但您也可以编写自己的 Provider,see here.
顺便说一下和NLB心跳无关,只用于负载均衡。
【讨论】: