[OpenSIPS-Users] Mediaproxy hanging sessions on high load
dan at ag-projects.com
Fri Mar 17 13:59:20 EDT 2017
On 16 Mar 2017, at 16:22, Daniel Zanutti wrote:
> Hi Dan
> Looks like this problem is only happening on virtual machines, not on physical machines. And only while they are on high load.
We have recommended since forever that people run a media relays on real hardware, yet time and again people ignore that and use virtual machines. I rest my case.
> But i'm not sure about the kernel rule, is there any way to check it?
You can check the conntrack rules in /proc/net/ip_conntrack
> Please take a look at this case, this Relay will never halt because there are more than 3k sessions that will never finish internally (the call has already hangup hours ago):
Ok, so that is what you meant by "the relay starts to hangup sessions".
This is something we encountered as well, but not to the extent you mention. In our case we have some 30-50 sessions in that state after 1-2 months of usage. It seems to always be associated with some network failures where sessions are not ended properly. We do not know exactly what causes it and given it's small impact for us it was never a priority to debug it. All I know is that it seems to be correlated with dialog updates that remove a RTP stream by setting its port to 0, without ending the session.
> Is there any way to drop these sessions? Maybe using the internal timeout system of mediaproxy?
Mediaproxy already employs several timeout mechanisms, both of its own as well as leveraging the timeout mechanism the linux conntrack implementation provides for rules that receive no traffic for a while. The problem is not the lack of those, the problem seems to be that under certain conditions which we have not yet identified, those timeouts seem to be ignored.
More information about the Users