You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am creating a new csRedis client for every request. is this a bad practice? i know clients like SE.redis reuse the connection. but the examples on this repo show the using statement so that is what i did.
System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted 191.234.53.96:6379
at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
at System.Net.Sockets.Socket.Connect(String host, Int32 port)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at CSRedis.Internal.RedisConnector.Connect()
at CSRedis.Internal.RedisConnector.Call[T](RedisCommand1 command) at CSRedis.RedisClient.Write[T](RedisCommand1 command)
at Common.Cache.csRedis.AddStringToCache(String key, String value, Nullable`1 minutes)
The text was updated successfully, but these errors were encountered:
CSRedis does not (yet) use connection pooling, so it sounds like you are exhausting your ephemeral port range with many closed connections hanging around in the TIME_WAIT state, which according to this old blog post is 240 seconds.
For now, you can try reusing a shared (static) csredis instance with the Async methods and Reconnect enabled. Meanwhile I'll investigate connection pooling.
any idea what is the reason for this?
i am creating a new csRedis client for every request. is this a bad practice? i know clients like SE.redis reuse the connection. but the examples on this repo show the using statement so that is what i did.
System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted 191.234.53.96:6379
at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
at System.Net.Sockets.Socket.Connect(String host, Int32 port)
at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
at CSRedis.Internal.RedisConnector.Connect()
at CSRedis.Internal.RedisConnector.Call[T](RedisCommand
1 command) at CSRedis.RedisClient.Write[T](RedisCommand
1 command)at Common.Cache.csRedis.AddStringToCache(String key, String value, Nullable`1 minutes)
The text was updated successfully, but these errors were encountered: