Timeout performing EVAL,inst: 9,queue: 1448,qu: 0,qs: 1448,qc: 0,
wr: 0,wq: 0,in: 65536,ar: 0,clientName: xxxx
使用microsoft recommendation在startup.cs初始化redis的方式是
var redis = ConnectionMultiplexer.Connect("<URI>"); services.AddDataProtection() .PersistKeysToRedis(redis,"DataProtection-Keys");
所以在阅读一些关于不是redis线程安全的文章时我将redis初始化更改为线程安全,如azure和here所示
private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() => { return ConnectionMultiplexer.Connect("mycache.redis.cache.windows.net,abortConnect=false,ssl=true,password=..."); }); public static ConnectionMultiplexer Connection { get { return lazyConnection.Value; } }
但现在问题是每隔一秒左右我就会收到以下错误:
The antiforgery token Could not be decrypted. —>
System.Security.Cryptography.CryptographicException: The key {xxxxxxx}
was not found in the key ring.
要么
An exception was thrown while deserializing the token.
要么
Error unprotecting the session cookie.
要么
System.Security.Cryptography.CryptographicException: The key {xxxxx}
was not found in the key ring.
什么问题,我该怎么办?
我应该再次更改初始化吗?但是应用程序将在重负载下停止.
更新
更多信息:
我不小心为redis使用了错误的连接字符串,并再次将其更改为正确的连接字符串.
我现在如何处理和缓解此错误?
但应该有办法处理这种错误.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。