-
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Environment
- Elixir: v1.6.6
- Operating system: Docker container running alpine-elixir
Current behavior
We've encountered the following exception numerous times in production error reports when using the pigeon library for sending large batches of FCM push notifications (1,000 notifications):
Elixir.ArithmeticError: bad argument in arithmetic expression
File "lib/connection/processor.ex", line 131, in Kadabra.Connection.Processor.process/2
File "lib/connection.ex", line 155, in Kadabra.Connection.handle_info/2
File "gen_server.erl", line 616, in :gen_server.try_dispatch/4
File "gen_server.erl", line 686, in :gen_server.handle_msg/6
File "proc_lib.erl", line 247, in :proc_lib.init_p_do_apply/3
Module "Elixir.Kadabra.Connection", in Kadabra.Connection.init/1
Unfortunately I haven't seen it happen locally, nor have I been able to reproduce it.
I've looked through Kadabra.Connection.Processor module and am wondering whether the issue is because the default max_concurrent_streams setting in the Kadabra.Connection.Settings module is :infinite but line 131 is assuming it will be a number:
to_ask =
settings.max_concurrent_streams - flow.stream_set.active_stream_countCould that be the culprit for the exception?
Metadata
Metadata
Assignees
Labels
No labels