Closed rafaelsiqueira closed 2 years ago
Hi folks,
I'm running this backend in production and sometimes we're getting this error:
GenServer #PID<0.20261.1> terminating ** (RuntimeError) Failed to count hit: too many attempts to create bucket. (hammer_backend_redis 6.1.0) lib/hammer_backend_redis.ex:199: Hammer.Backend.Redis.do_count_hit/6 (hammer_backend_redis 6.1.0) lib/hammer_backend_redis.ex:144: Hammer.Backend.Redis.handle_call/3 (stdlib 3.13.1) gen_server.erl:706: :gen_server.try_handle_call/4 (stdlib 3.13.1) gen_server.erl:735: :gen_server.handle_msg/6 (stdlib 3.13.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
This could be a race condition since we're using more than 1 node.
I was wondering...
Why are we raising an error instead of return {:error, :too_many_attempts}. This makes things harder to handle.
raising
{:error, :too_many_attempts}
Running into same issue
Hi folks,
I'm running this backend in production and sometimes we're getting this error:
This could be a race condition since we're using more than 1 node.
I was wondering...
Why are we
raising
an error instead of return{:error, :too_many_attempts}
. This makes things harder to handle.