taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 131 forks source link

No way to set connection timeouts #120

Closed halgari closed 9 years ago

halgari commented 9 years ago

We recently had a problem in production where our Redis server went down and our threadpool backed up because when trying to connect to Redis (through Carmine), the connection timeout defaults to some really high value.

I confirmed this by having carmine try to connect to some non-existant IP, the connection only fails after about 3 minutes or so. Can we get a way to set the connection timeout? :timeout-ms only seems to work for reads.

ptaoussanis commented 9 years ago

Hi Timothy,

Thanks a lot for bringing this to my attention. Have just pushed [com.taoensso/carmine "2.9.0"] to Clojars which:

  1. Allows separate :conn-timeout-ms and :read-timeout-ms connection-spec controls.
  2. Adds a default 4 second :conn-timeout-ms to all connections.

Let me know if that does the job?

Cheers! :-)

halgari commented 9 years ago

That seems to do the trick. Thanks a lot for the fast turn-around on this issue!