<div dir="ltr"><div>We're using SylkServer as an audio conference server for webRTC and
 SIP clients. Only the Conference and the WebRTC Gateway applications 
are enabled in the config. Our SylkServer version is 5.0.0, checked out 
from <a href="https://github.com/AGProjects/sylkserver/releases/tag/release-5.0.0" target="_blank">this GitHub tag</a>.</div><div><br></div><div>Once
 in several days, we observe the following problem: the CPU usage by the
 SylkServer process starts to grow and all the webRTC client connection 
attempts fail. After some time (usually a few hours), the following 
exception appears in the logs:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ERROR 
   [sylk.core]     Exception occurred while setting up stream from SDP: 
Could not add audio object to audio mixer: Too many objects of the 
specified type (PJ_ETOOMANY)<br>ERROR    [sylk.core]     Traceback (most recent call last):<br>ERROR    [sylk.core]       File "/srv/sylkserver/sylk/session.py", line 394, in init_incoming<br>ERROR    [sylk.core]         stream = stream_type.new_from_sdp(self, remote_sdp, index)<br>ERROR    [sylk.core]       File "/usr/lib/python2.7/dist-packages/sipsimple/streams/rtp/__init__.py", line 425, in new_from_sdp<br>ERROR    [sylk.core]         stream = cls()<br>ERROR    [sylk.core]       File "/usr/lib/python2.7/dist-packages/sipsimple/streams/rtp/audio.py", line 24, in __init__<br>ERROR    [sylk.core]         self.bridge = AudioBridge(self.mixer)<br>ERROR    [sylk.core]       File "/usr/lib/python2.7/dist-packages/sipsimple/audio.py", line 129, in __init__<br>ERROR    [sylk.core]         self.multiplexer.start()<br>ERROR    [sylk.core]       File "sipsimple/core/_core.sound.pxi", line 1310, in sipsimple.core._core.MixerPort.start (sipsimple/core/_core.c:38212)<br>ERROR    [sylk.core]       File "sipsimple/core/_core.sound.pxi", line 1307, in sipsimple.core._core.MixerPort.start (sipsimple/core/_core.c:38143)<br>ERROR    [sylk.core]       File "sipsimple/core/_core.sound.pxi", line 471, in sipsimple.core._core.AudioMixer._add_port (sipsimple/core/_core.c:24844)</blockquote><div><br></div><div>We've
 added some logs to the SylkServer and the Python SipSimple library to 
clear things up a bit. What we discovered is that during the period when
 the connection attempts fail, the number of used audio mixer ports (we 
were logging the conf->port_cnt counter in pjsip/pjmedia/src/pjmedia/conference.c)
 grows steadily and reaches the limit (9999) in the end. Right before 
this period starts there are these two lines in the logs:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Traceback (most recent call last):<br>File "/usr/lib/python2.7/logging/__init__.py", line 861, in emit</blockquote><div><br></div><div>This
 looks like a cropped exception message, but there is nothing more. It 
might be that some log message is ill-formatted but we're not sure where
 to look for it.</div><div><br></div><div>Please let us know if this is a known issue or if you have any advice on how we could track it down.</div><div><br></div><div>Thanks.</div></div>