StartTheShift/jondis

can't auto reconnect

Opened this issue · 4 comments

  1. the init method in the _checkpid does not pass the hosts params
  2. every time reconnect use the _configure method, it is useless, because self._hosts
    is changed . If the master can't connect for temporary, but recovered soon, you will never connect to the origin master.

Have you verified this against a running cluster?

On your first issue - the whole point is to avoid sharing the same set of sockets if the process was forked. I believe this is how the default redis pool works as well.

We always use one master/slave pair.The default pool does not have the hosts param, and always pass the connection_kwargs param over the init method when _checkpid.

Jondis will work only when the redis master has changed, but if the original master did not change(downtime is too short for failover or recover to the old master) , the _configure method won't work. Now we had to restart the web instance to resolve this problem.

OK, good to know. I'll take a look at this and see if I can reproduce the problem. I've been running Jondis in production for over half a year and haven't seen this yet though.