Otherwise node_redis will not try to reconnect to the redis server.
As it's configured, out of the box (unless I'm missing something) connect-redis will crash your node instance when you restart redis.
Can you update the basic example to include whatever code is needed to handle a redis crash? Have you considered giving retry logic to connect-redis with backoff, etc? Or making lazy connections to redis on an as needed basis? Most distributed systems assume a faulty network and crashy servers.
Thanks for a cool middleware!
Not sure, but I think it is being handled here now: https://github.com/visionmedia/connect-redis/blob/master/lib/connect-redis.js#L70
+1 @ozten, app gets crashed after Redis disconnect + reconnect (firstname.lastname@example.org). Normally Redis client has a reconnect ability, not sure why connect-redis does not reconnect. See this gist discussion for possible solution.
ok. I will look into this tomorrow.
Closing this, node_redis will auto-reconnect when a disconnect occurs. If it doesn't, that's an issue with node_redis (connect-redis isn't doing anything special here). 2.1.0 is using latest redis.
Investigated this a while ago; FWIW node-redis reconnects quite well as long as you explicitly listen to its error event (this was pretty undocumented back then).