ctstone / csredis

.NET client for Redis and Redis Sentinel (2.8). Includes both synchronous and asynchronous clients.
Other
292 stars 111 forks source link

Connection timeout #1

Closed kixorz closed 10 years ago

kixorz commented 10 years ago

I'm trying to use your library, but I'm getting a strange problem. After short period of time (couple minutes) executing RedisClient.publish throws RedisProtocolException Unexpected response type: -1 (expecting Int)

Publishing few messages works and then, when I let it sit for a few minutes, it seems to timeout the connection? Is there any reconnection logic in the driver? I didn't see any.

ctstone commented 10 years ago

Hi Adam,

Unfortunately there is no retry logic as yet. Could you try sending a Ping() command once a minute or so to keep the connection alive?

I'll look at implementing reconnect for a future release.

Chris

On Tue, Dec 17, 2013 at 6:08 PM, Adam Konrád notifications@github.comwrote:

I'm trying to use your library, but I'm getting a strange problem. After short period of time (couple minutes) executing RedisClient.publishthrows RedisProtocolException Unexpected response type: -1 (expecting Int)

Publishing few messages works and then, when I let it sit for a few minutes, it seems to timeout the connection? Is there any reconnection logic in the driver? I didn't see any.

— Reply to this email directly or view it on GitHubhttps://github.com/ctstone/csredis/issues/1 .

ctstone commented 10 years ago

Reconnect is now implemented in the master branch