简体   繁体   English

IIS 8 应用程序池回收与 SignalR 2.3.0

[英]IIS 8 Application pool recycle vs SignalR 2.3.0

I have a website in IIS 8.5.9600.16384, we communicate with thousands of mobile devices through cyclic synchronisation and through SignalR 2.3.0.我在 IIS 8.5.9600.16384 中有一个网站,我们通过循环同步和 SignalR 2.3.0 与数千个移动设备进行通信。

This morning we had an application pool reset during working hours, which caused the SignalR to call "OnReconnect" of all our mobile devices at the same time.今天早上我们在工作时间重置了应用程序池,这导致 SignalR 同时调用我们所有移动设备的“OnReconnect”。

I though that IIS started new processes first and then killed the old, not having downtime.我认为 IIS 首先启动新进程,然后杀死旧进程,没有停机。

Can somebody tell me exactly what happens when IIS recycles it's application pool on the SignalR side?有人能告诉我当 IIS 在 SignalR 端回收它的应用程序池时会发生什么吗? And in which cases can there be a connection downtime?在哪些情况下会出现连接停机? (ex : if the server is busy?) (例如:如果服务器忙?)

Edited : The application pool was recycled by IIS because of the "time limit".编辑:由于“时间限制”,应用程序池被 IIS 回收。 The IT team will change this setting so that the application pools reset every day at night time when it will have a lower impact on our applications. IT 团队将更改此设置,以便应用程序池每天在夜间重置,这对我们的应用程序的影响较小。

A worker process with process id of '8720' serving application pool 'DefaultAppPool' has requested a recycle because the worker process reached its allowed processing time limit.

Also confirmed that disallowOverlappingRotation is not set to True.还确认了 disallowOverlappingRotation 未设置为 True。 Any hint would help.任何提示都会有所帮助。


A few years later, I'm still getting some problems with the application pool recycle and SignalR.几年后,我仍然在应用程序池回收和 SignalR 方面遇到一些问题。 We are occasionally seeing thousands of re-connections of SignalR while the application pool recycle occurs, opening more than 60k TCPIP ports and causing a crash in IIS.当应用程序池回收时,我们偶尔会看到数以千计的 SignalR 重新连接,打开超过 60k TCPIP 端口并导致 IIS 崩溃。

We managed to have it run "okay" for quite some time but it still crashes.我们设法让它“正常”运行了很长一段时间,但它仍然崩溃。 Any hint would help.任何提示都会有所帮助。 thanks谢谢

I'd first identify how IIS was reset.我首先确定 IIS 是如何重置的。 If you experienced a crash or performed an IISReset, the processes would be down before a new one stood back up.如果您遇到崩溃或执行了 IISReset,则进程会在新进程重新启动之前停止运行。 If on the other hand you configured AppPool recycling, then the overlapping processes should occur as you mention.另一方面,如果您配置了 AppPool 回收,那么您提到的重叠过程应该会发生。 I would check the System Event Log for recycling messages.我会检查系统事件日志以获取回收消息。 Note that not all recycle reasons are logged by default.请注意,并非所有回收原因都默认记录。

You may also check to make sure disallowOverlappingRotation is not set to True.您还可以检查以确保 disallowOverlappingRotation 未设置为 True。

Specifies whether the WWW Service should start another worker process to replace the existing worker process while that process is shutting down.指定 WWW 服务是否应启动另一个工作进程以在该进程关闭时替换现有工作进程。 The value of this property should be set to true if the worker process loads any application code that does not support multiple worker processes.如果工作进程加载任何不支持多个工作进程的应用程序代码,则应将此属性的值设置为 true。 https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/recycling/ https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/recycling/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM