Server Error in '/' Application.
Only one usage of each socket address (protocol/network address/port) is normally permitted IP:端口
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted IP:端口
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SocketException (0x2740): Only one usage of each socket address (protocol/network address/port) is normally permitted IP:端口]
System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port) +702
System.Net.Sockets.Socket.Connect(String host, Int32 port) +162
ServiceStack.Redis.RedisNativeClient.Connect() +133
[RedisException: could not connect to redis Instance at IP:端口]
ServiceStack.Redis.RedisNativeClient.Connect() +1040
ServiceStack.Redis.RedisNativeClient.AssertConnectedSocket() +133
ServiceStack.Redis.RedisNativeClient.SendCommand(Byte[][] cmdWithBinaryArgs) +31
ServiceStack.Redis.RedisNativeClient.SendExpectInt(Byte[][] cmdWithBinaryArgs) +18
ServiceStack.Redis.RedisClient.ContainsKey(String key) +9
是不是redis的问题呢?
是
[RedisException: could not connect to redis Instance at IP:端口]
redis有連線數量上限,超過上限取不到connection物件
樓主有對redis設timeout時間?
另外假如可以共用的情況
不需要每次set get都去開一個新的connection