microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes
http://redis.io
Other
20.78k stars 5.37k forks source link

An existing connection was forcibly closed by the remote host #510

Open nertim opened 7 years ago

nertim commented 7 years ago

We are using redis-server.exe (v3.0.501) in our unit tests for some test scenarios. We're random failures with this error message:

SocketFailure on 127.0.0.1:6388/Subscription, origin: Read, input-buffer: 0, outstanding: 0, last-read: 5s ago, last-write: 5s ago, unanswered-write: 1228466s ago, keep-alive: 60s, pending: 0, state: ConnectedEstablished, in: 0, ar: 1, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, mgr: ProcessReadQueue, err: never

StackExchange.Redis.RedisConnectionException: SocketFailure on 127.0.0.1:6388/Subscription, origin: Read, input-buffer: 0, outstanding: 0, last-read: 5s ago, last-write: 5s ago, unanswered-write: 1228466s ago, keep-alive: 60s, pending: 0, state: ConnectedEstablished, in: 0, ar: 1, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, mgr: ProcessReadQueue, err: never ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at StackExchange.Redis.PhysicalConnection.StackExchange.Redis.ISocketCallback.Read() in C:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\PhysicalConnection.cs:line 1003 --- End of inner exception stack trace ---

The redis-server.exe is passed in following arguments: --port --bind 127.0.0.1 --persistence-available no Random port number between 6380 - 6390.

At the end of each test the process is killed. Now these tests are always running.. just every once in a while we see the above failures. Any ideas/help would be appreciated.

KolyaNET commented 7 years ago

I also get a similar problem. Errors arise "accidentally".