Closed alexandremcosta closed 4 years ago
If we reach a pool max overflow limit, or if we configure pool_max_overflow with 0:
:eredis_cluster.q(["GET", "something"])
:eredis_cluster.query/3
:eredis_cluster_pool:transaction/2
transaction(PoolName, Transaction) -> try poolboy:transaction(PoolName, Transaction) catch exit:_ -> {error, no_connection} end.
{error, no_connection}
:eredis_cluster.handle_transaction_result/2
eredis_cluster_monitor:refresh_mapping(Version)
:eredis_cluster_monitor.reload_slots_map/1
:eredis_cluster_monitor.get_cluster_slots/1
:eredis:q(Connection, ["CLUSTER", "SLOTS"])
This triggers infinity error like:
(ErlangError) Erlang error: {:timeout, {:gen_server, :call, [:eredis_cluster_monitor, {:reload_slots_map, 1}]}}
Until we restart our application, which releases the pool of workers and our system is back...
Actually this is wrong, because the ["CLUSTER", "SLOTS"] call is done by eredis not eredis_cluster, so it does not trigger an infinity loop.
["CLUSTER", "SLOTS"]
eredis
eredis_cluster
If we reach a pool max overflow limit, or if we configure pool_max_overflow with 0:
:eredis_cluster.q(["GET", "something"])
:eredis_cluster.query/3
on src/eredis_cluster.erl:180:eredis_cluster_pool:transaction/2
on src/eredis_cluster.erl:186{error, no_connection}
because we are out of poolboy workers:eredis_cluster.handle_transaction_result/2
patterns match the resulteredis_cluster_monitor:refresh_mapping(Version)
:eredis_cluster_monitor.reload_slots_map/1
:eredis_cluster_monitor.get_cluster_slots/1
:eredis:q(Connection, ["CLUSTER", "SLOTS"])
This triggers infinity error like:
Until we restart our application, which releases the pool of workers and our system is back...