c# - Azure Redis 缓存 : "SocketClosed on PING" error

标签 c# azure redis stackexchange.redis

运行测试控制台应用程序以连接到 Azure Redis 缓存时,它突然(对客户端或服务器没有任何更改)停止允许我连接,并出现“SocketClosed on PING”错误。

以下是连接尝试的日志:

[redacted].redis.cache.windows.net:6380,password=*****,ssl=True,abortConnect=False

Connecting [redacted].redis.cache.windows.net:6380/Interactive... BeginConnect: [redacted].redis.cache.windows.net:6380 1 unique nodes specified Requesting tie-break from [redacted].redis.cache.windows.net:6380 > __Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=3,Free=997,Min=4,Max=1000), WORKER: (Busy=0,Free=1023,Min=4,Max=1023) EndConnect: [redacted].redis.cache.windows.net:6380 Configuring SSL Connected Interactive/[redacted].redis.cache.windows.net:6380 Server handshake Authenticating (password) Setting client name: [redacted] Auto-configure... Sending critical tracer: Interactive/[redacted].redis.cache.windows.net:6380 Writing to Interactive/[redacted].redis.cache.windows.net:6380: ECHO Flushing outbound buffer Starting read Connect complete: [redacted].redis.cache.windows.net:6380 All tasks completed cleanly, IOCP: (Busy=2,Free=998,Min=4,Max=1000), WORKER: (Busy=2,Free=1021,Min=4,Max=1023) [redacted].redis.cache.windows.net:6380 faulted: SocketClosed on PING All tasks are already complete [redacted].redis.cache.windows.net:6380 failed to nominate (Faulted)

UnableToResolvePhysicalConnection on GET No masters detected [redacted].redis.cache.windows.net:6380: Standalone v3.0.0, master; keep-alive: 00:01:00; int: Connecting; sub: Connecting; not in use: DidNotRespond [redacted].redis.cache.windows.net:6380: int ops=9, qu=0, qs=0, qc=0, wr=0, sync=10, socks=2; sub ops=4, qu=0, qs=0, qc=0, wr=0, sync=4, socks=2 Circular op-count snapshot; int: 0+9=9 (0.90 ops/s; spans 10s); sub: 0+4=4 (0.40 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago resetting failing connections to retry... retrying; attempts left: 2... 1 unique nodes specified Requesting tie-break from [redacted].redis.cache.windows.net:6380 > __Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=2,Free=998,Min=4,Max=1000), WORKER: (Busy=4,Free=1019,Min=4,Max=1023) All tasks completed cleanly, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=2,Free=1021,Min=4,Max=1023) [redacted].redis.cache.windows.net:6380 faulted: SocketClosed on PING All tasks are already complete [redacted].redis.cache.windows.net:6380 failed to nominate (Faulted) UnableToResolvePhysicalConnection on GET No masters detected [redacted].redis.cache.windows.net:6380: Standalone v3.0.0, master; keep-alive: 00:01:00; int: Disconnected; sub: Disconnected; not in use: DidNotRespond [redacted].redis.cache.windows.net:6380: int ops=18, qu=0, qs=0, qc=0, wr=0, sync=20, async=1, socks=3; sub ops=12, qu=0, qs=0, qc=0, wr=0, sync=12, socks=3 Circular op-count snapshot; int: 0+18=18 (1.80 ops/s; spans 10s); sub: 0+12=12 (1.20 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago resetting failing connections to retry... retrying; attempts left: 1... 1 unique nodes specified Requesting tie-break from [redacted].redis.cache.windows.net:6380 > __Booksleeve_TieBreak... Allowing endpoints 00:00:05 to respond... Awaiting task completion, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=3,Free=1020,Min=4,Max=1023) All tasks completed cleanly, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=2,Free=1021,Min=4,Max=1023) [redacted].redis.cache.windows.net:6380 faulted: SocketClosed on PING All tasks are already complete [redacted].redis.cache.windows.net:6380 failed to nominate (Faulted) UnableToResolvePhysicalConnection on GET No masters detected [redacted].redis.cache.windows.net:6380: Standalone v3.0.0, master; keep-alive: 00:01:00; int: Disconnected; sub: ConnectedEstablishing; not in use: DidNotRespond [redacted].redis.cache.windows.net:6380: int ops=27, qu=0, qs=0, qc=0, wr=0, sync=30, async=2, socks=4; sub ops=16, qu=0, qs=4, qc=0, wr=0, sync=12, socks=4 Circular op-count snapshot; int: 0+27=27 (2.70 ops/s; spans 10s); sub: 0+16=16 (1.60 ops/s; spans 10s) Sync timeouts: 0; fire and forget: 0; last heartbeat: -1s ago Starting heartbeat...

我正在使用 StackExchange.Redis nuget 包(版本 1.1.608),并且连接如下:

var db = ConnectionMultiplexer.Connect("[redacted].redis.cache.windows.net:6380,password=[redacted],ssl=True,abortConnect=False",sw)

如有任何建议,我们将不胜感激。

最佳答案

问题是我没有断开客户端连接,并且耗尽了可用连接:

enter image description here

关于c# - Azure Redis 缓存 : "SocketClosed on PING" error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41588575/

相关文章:

c# - 如何将日历月和日存储在数组中?

c# - 在同一应用的不同用户之间共享 OneDrive 中的文件

Azure 在特定时间自动缩放

c# - 使用 Active Directory 连接到 Azure DB - 通用,并在 C# 中使用 MFA 支持身份验证

redis - 如何按照键存储的顺序顺序扫描Redis键空间?

c# - 为什么空字符串不是字符串对象

c# - 嵌套任务和子任务有什么区别

azure - 有没有办法在azure blob存储中按层过滤

c - EPOLLERR 和 EPOLLHUP 的真正含义是什么以及如何处理它们?

java - 为 Spring session 和自定义数据使用不同的 Redis 数据库