ex_rabbit_pool icon indicating copy to clipboard operation
ex_rabbit_pool copied to clipboard

Hard limit of 5s to wait for a channel?

Open brettrp opened this issue 5 years ago • 1 comments

During some load testing for our application, I ran into crashes like the following when calling ExRabbitPool.with_channel:

{:timeout, {GenServer, :call, [#PID<0.2333.0>, :checkout_channel, 5000]}}" (elixir 1.11.2) lib/gen_server.ex:1027: GenServer.call/3

This is because the default timeout for the synchronous GenServer.call/3 for :checkout_channel is 5000ms.

I'm not sure whether this is intended behaviour, or whether the timeout for getting a channel should be configurable, or possibly whether that call should be asynchronous along with a configurable timeout.

brettrp avatar Mar 10 '21 06:03 brettrp

getting a channel can be configurable, that would be a great PR, maybe passing a keyword options to set the timeout so it can be modified in each case independently with 5sec default

sescobb27 avatar Jun 22 '21 14:06 sescobb27