简体   繁体   中英

SignalR static objects inside hub makes reconnect fail with backplane

We have implemented a server with backplane where there are more than 100+ clients are connecting. But when we were testing it we identified that when ever the clients are getting disconnected none of them are able to reconnect back. Also we noticed high number of thread usage (more than 5000) by w3wp.exe and then IIS crashes.

In order to identify what is the cause of this we cleaned the hub and what we found was that when the logger class is removed the backplane works perfectly. We have used NLog logger and initiated it as a static logger.

private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();

In order to confirm whether it is problem with NLog we created another static object inside the hub class but that also showed the same high thread usage. So it seems that whenever there is a static objects clients are unable to reconnect and there is a high usage of threads in the w3wp.exe service. What is the cause for this situation?

PS- We tested using both SQL and redis backplane which showed the same exact results.

问题不是使用集线器内部的静态对象,而是使用NLogTraceListener记录日志信号跟踪。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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