简体   繁体   English

与StackExchange.Redis闲置一段时间后出现连接问题

[英]Connection issue after some idle time with StackExchange.Redis

I'm experiencing an issue with StackExchange.Redis: after some idle time (some hours), the whole provider is unable to connect to Redis again throwing the so-called exception It was not possible to connect to the redis server(s); to create a disconnected multiplexer [...] 我遇到了StackExchange.Redis的问题:经过一段空闲时间(几小时)后,整个提供程序都无法再次连接到Redis,并抛出了所谓的异常It was not possible to connect to the redis server(s); to create a disconnected multiplexer [...]无法连接到Redis It was not possible to connect to the redis server(s); to create a disconnected multiplexer [...] It was not possible to connect to the redis server(s); to create a disconnected multiplexer [...] . It was not possible to connect to the redis server(s); to create a disconnected multiplexer [...]

Everything goes fine again if I recycle the IIS application pool, and after another idle time, the issue happens again. 如果我回收IIS应用程序池,一切都会恢复正常,并且在另一个空闲时间之后,问题再次发生。 This is why I guess it's not a problem with the Redis instance but with StackExchange.Redis, because I'm not restarting the Redis service but the IIS application pool. 这就是为什么我认为Redis实例不是问题,而是StackExchange.Redis,因为我不是重新启动Redis服务,而是IIS应用程序池。

Is there any guidance on how to manage the Redis multiplexer in addition to ensuring that there's a single multiplexer instance per application domain? 除了确保每个应用程序域只有一个多路复用器实例之外,是否还有任何有关如何管理Redis多路复用器的指南?

In my case, I've solved this setting AbortOnConnectFail to false . 就我而言,我已经将AbortOnConnectFail设置为false This seems to fix the issue for now. 这似乎可以解决此问题。

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

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