toilet capacity of outbound_rtx_controller
Hi, I'm getting the following error on SessionBin:
sip_rtp is SessionBin with following inputs for video:
and has following output for video:
How can I debug cause of this?
7 Replies
should I to link somethink to SessionBin to handle rtx, if yes, what exactly?
In your case, error is raised because
:sip_rtp/{:outbound_rtx_controller, 1929338881}
sends buffers to :sip_video
at a rate that :sip_video
can't keep up (what is a little weird for me, because :sip_video
is UDP.Endpoint
).
For some reason, logs that you have posted are cut in the middle. Try putting this:
|> via_in(Pad.ref(:input), toilet_capacity: 1000)
before get_child(:sip_video)
in the second spec, that you sent. You can change 1000
to any bigger number, that you want. Let me know, if this change fixed your problem.Ok, you give me some directions for debug, thank you
btw I'm getting the same error with 1000 now:
I set toilet_capacity to 10000 and stream is flowing now. How can I debug the current buffer state of :sip_video? add debug to handle_buffer?
https://gist.github.com/spscream/a978129cf3d99bc2d1d5cb8b1eefe944 this is code for my UDP.Endpoint
Could it be that you get a burst of packets at the beginning and then it behaves fine?
it might be so. Should I handle toilet overflow some way on my side, e.g. dropping input buffers?
I don't want to have very large value for toilet_capacity
In this case,
toilet_capacity
specifies, how many buffers from outbound_rtx_controller
can wait in the mailbox of UDP.Endpoint
(to be strict, the exact boundary will be little bit bigger that value passed to this option, but the general sense stays the same).
If @Qizot ot is right, UDP.Endpoint
receives big batch of packets, which size exceeds significantly toilet_capacity
, but it is possible, that UDP.Endpoint
will be able to consume this batch over time. If your program works fine after increasing toilet_capacity
and you don't see any other bugs, I wouldn't worry about setting this option to a bigger number.
The real problem would occur, if the size of UDP.Endpoint
mailbox were increasing over time. This scenario should cause 2 effects:
1) after increasing toilet_capacity,
you will get Toilet overflowed error, only after a longer time
2) amount of memory used by BEAM
will be increasing over a time