<div dir="ltr">I checked the code and found the problem. Zoiper was not happy to get a NOTIFY with Expires: 0 after sending a SUBSCRIBE with Expires: 0<div>I added a patch to the code to skip responding with such a NOTIFY when zoiper is present.</div>
<div><br></div><div>This is not a real fix but its better than having everyone's box die.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 9:40 AM, Ashley Breeden <span dir="ltr"><<a href="mailto:ash@url.net.au" target="_blank">ash@url.net.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi All,<div><br></div><div>I wanted to share my findings with everyone on the list in case anyone runs into the same issue I had as it what a nightmare to find. A special thanks must be given to FreeSWITCH Consulting, especially Eliot who assisted in debugging and giving me some fresh ideas to look at.</div>
<div><br></div><div>For some time now I have struggled to upgrade my servers to 1.2 stable from 1.0.head (git-e3698c2 2012-03-23 01-21-55 +0100). The issue I always faced was is that after I upgraded the servers it would run happily for the next 5-10 hours but for no reason FreeSWITCH would become unresponsive and stop accepting registrations. If you ran command like show channels, status etc the command would just freeze and there would be no response.</div>
<div><br></div><div>Typically the freeze would occur when the servers were practically idle, looking at the logs you would see:</div><div><br></div><div>[WARNING] sofia_reg.c:1524 SIP auth challenge (REGISTER) on sofia profile 'internal' for [1050@<a href="http://domain.com" target="_blank">domain.com</a>] from ip x.x.x.x</div>
<div><div>[WARNING] sofia.c:1639 MSG Thread 2 Started</div><div>[WARNING] sofia.c:1639 MSG Thread 1 Started</div></div><div><br></div><div>In attempt to resolve it I tried new hardware, changed from Centos to Debian, MySQL to Postgres, nothing I seemed to do fixed the issue.</div>
<div><br></div><div>I started to run some network analysis on the server and what I noticed is about 20 minutes before the server freeze the traffic would spike from 100kbps to around 400kbps, on closer inspection I noticed that the 300kbps spike was actually between the server and a single IP on port 5060. Analysing the packets (tcpdump -s0 -A port 5060) I could see that one registration was sending SUBSCRIBE events at the rate of about 300-400 per second and FreeSWITCH was sending a NOTIFY back for each SUBSCRIBE, once the server froze the traffic would stop which is what made it hard to find as you had to be looking at the network traffic before the freeze. Once I knew the user causing the increased traffic flow I was able to work out that the user agent causing this was Zoiper (rev. 11137). It would appear Zoiper would get into a loop with the server and keep sending SUBSCRIBE packets for the message waiting indicator. </div>
<div><br></div><div>I have spoken to Zoiper who have taken the issue on board and informed me it does not happen on Zoiper 3, but does happen on Zoiper 2, however they plan to fix it in the next release of Zoiper 2. They suggested for the moment to disable the MWI Subscribe option by doing "Go to the preferences -> select your sip account -> enable "show advanced options" andchange the mwi subscribe drop down to "disabled"</div>
<div><br></div><div>The strange thing with all this is that the same Zoiper client never had a problem on version 1.0.head (git-e3698c2 2012-03-23 01-21-55 +0100) but as soon as you upgraded to 1.2 or even the current git versions you would find that FreeSWITCH and Zoiper would get into a SUBSCRIBE/NOTIFY Loop.</div>
<div><br></div><div>I hope this information is of some help to someone else in the future and is able to ensure they do not have to go through the same nightmare I did. </div><div><br></div><div>If anyone has any suggestions on ways to limit the SUBSCRIBE/NOTIFY responses so that you can avoid this happening in the future I would be very interested to hear, even if you have any other feedback that might have assisted in finding this issue quicker I would be very interested.</div>
<div><br></div><div><br></div><div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-wrap:break-word;word-spacing:0px">
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-wrap:break-word;word-spacing:0px">
<span style="border-spacing:0px;text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;font-variant:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px;font-size:medium"><div style="font-style:normal;font-family:Helvetica;font-weight:normal">
<span style="font-family:Helvetica,Arial,Geneva">Regards,</span><span style="font-family:Helvetica,Arial,Geneva"><br></span><span style="font-family:Helvetica,Arial,Geneva"><br></span><span style="font-family:Helvetica,Arial,Geneva"><b><font color="223D20" face="Helvetica, Arial, Geneva">Ashley Breeden</font></b></span><span style="font-family:Helvetica,Arial,Geneva"><br>
</span><span style="font-family:Helvetica,Arial,Geneva">URL Networks Pty Ltd</span><span style="font-family:Helvetica,Arial,Geneva"><br></span><span style="font-family:Helvetica,Arial,Geneva"><b>WWW:</b></span><span style="font-family:Helvetica,Arial,Geneva"> </span><span style="font-family:Helvetica,Arial,Geneva"><a href="http://www.url.net.au" target="_blank">http://www.url.net.au</a></span><br>
</div><div style="font-style:normal;font-family:Helvetica"><span style="font-family:Helvetica,Arial,Geneva"><b>Twitter:<span> </span></b>@urlnetworks<br></span><br></div><div style="font-weight:normal"><font color="#b7ca78" face="Helvetica, Arial, Geneva"><b><i><br>
</i></b></font></div></span></div></span></div></span><br></div><br></div><br><br>
</div>
<br></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900
</div>