IIS 7 自动重新启动
我在 IIS 上部署了 WCF 服务。 (BasicHTTPBinding 与 [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)])
我已经构建了自定义内存中会话管理,现在我面临一个奇怪的问题,即 IIS 7 自动重新启动,甚至没有抛出任何类型的警告或错误,甚至在 EventLog 中也没有。此问题会导致破坏所有可用会话。
我在使用 log for net 记录 Application_Start 和 Application_End 方法后发现了这个问题,并且我将断点放在 application_start 中,并在测试执行之间暂停在那里。
这种情况很少发生,但我需要知道为什么会发生以及它是否正常且可接受。如果不是,那么可能的原因是什么。
问候 穆巴沙尔·艾哈迈德
I have a WCF Service Deployed on IIS. (BasicHTTPBinding with [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)])
I have built custom in-memory session management and Now I am facing a strange problem that is IIS 7 Restarts Automatically without even throwing any kind of warning or error not even in EventLog. This problem leads to destroy the all available sessions.
I discovered this issue after logging the Application_Start and Application_End methods using log for net and also i put the break point in application_start and it paused there in between test execution.
This happens rarely but i need to know why it happens and if it is normal and acceptable or not. if not then what may be the possible reasons of this.
Regards
Mubashar Ahmad
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
难道是应用程序池被回收了? IIS 6 默认将此设置为 1740 分钟。至于 IIS 7 我猜你也会有同样的设置?我知道在 IIS 6 中这个“事件”不会被记录为“n 错误”。
Could it be the app pool being re-cycled? IIS 6 has this set on by default to 1740 minutes. As for IIS 7 I guess you would have the same kind of setting? I know in IIS 6 this "event" is not logged as 'n error.
IIS 会在检测到“不健康”进程时回收工作进程,或者在达到某些操作员可配置的限制后。
其中限制包括:
更多信息
IIS recycles worker processes either when it detects an "unhealthy" process, or after certain operator-configurable limits are reached.
Among the limits are:
more info
会话超时(与应用程序池回收分开)默认设置为 90 分钟,这是在应用程序级别设置的。这也意味着 Session 中举行的任何事情都将在那时被吹走。您可以通过 IIS6 中的虚拟目录/应用程序的属性以及 IIS7 中的 SessionState->Open Feature(当您选择了应用程序时)来设置它。
另请注意,如果您的 Web 服务托管在其中之一,则可以通过 ASP.Net 应用程序的 web.config 设置会话超时。
The Session timeout (which is separate to the app pool recycling) is set to 90 minutes by default, this is set at the application level. This also means anything being held in Session will be blown away at that time. You can set it via the properties of the virtual directory/application in IIS6, and via SessionState->Open Feature in IIS7 (when you have the application selected).
Also note that session timeout can be set via the web.config of an ASP.Net application, should your web services be hosted in one of those.