<div dir="ltr">Are we talking about proxy_read_timeout param?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 10, 2017 at 8:51 PM, Chad Phillips <span dir="ltr"><<a href="mailto:chad@apartmentlines.com" target="_blank">chad@apartmentlines.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.800000190734863px">I’ve seen this issue when everyone is audio muted and/or doesn’t trigger a talking event for more than 60 seconds, which in my use case does happen. I would agree under normal videoconferencing circumstances it would be rare to go 60 seconds without a single event being sent along the websocket.</span><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 9, 2017 at 7:38 AM, Mundkowsky, Robert <span dir="ltr"><<a href="mailto:rmundkowsky@ets.org" target="_blank">rmundkowsky@ets.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-3133951273382688041m_5443940142988388462WordSection1">
<p class="MsoNormal"><a name="m_-3133951273382688041_m_5443940142988388462__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I am curious, what type of situation causes this problem?  I mean, we use Verto for a conference, granted without Nginx, and seems like
 there are always packets being sent back and forth even when there is no audio or video.<u></u><u></u></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Robert
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> FreeSWITCH-users [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounc<wbr>es@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Chad Phillips<br>
<b>Sent:</b> Friday, October 6, 2017 4:53 PM<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freesw<wbr>itch.org</a>><br>
<b>Subject:</b> Re: [Freeswitch-users] Sending keepalives on Verto websocket<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">There are various suggested solutions out there. On the Nginx config side, easiest is to increase the <code><span style="font-size:10.0pt">proxy_read_timeout </span></code>setting to something high, but that seems like it could result in
 connections getting hung open if the server process goes away.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Then there’s this module which looks pretty fancy and claims to solve the problem: <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyaoweibin%2Fnginx_tcp_proxy_module&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=lFoJ8DsDuceYjteVcZ72fMtgH%2BgmSWHj5g1MvTe%2FKzs%3D&reserved=0" target="_blank">https://github.com/ya<wbr>oweibin/nginx_tcp_proxy_module</a>
 — it requires custom compiling nginx though…<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I think I’ll stick with my current solution, which basically follows the other suggestion of having the server send periodic keepalives, except that I’m initiating from the client. Steps for others interested:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">1. Add ‘echo’ to the list of jsonrpc-allowed-methods in any relevant domains in your user directory<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">2. Do something like this after a successful websocket connection:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">          MODULE.keepAliveTimer = setInterval(function() {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">            verto.rpcClient.call("echo", {keepalive: true});<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">          }, VERTO_KEEPALIVE_INTERVAL)<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">3. Add some cleanup on websocket close:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">        if (MODULE.keepAliveTimer) {<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">          clearInterval(MODULE.keepAlive<wbr>Timer);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">          MODULE.keepAliveTimer = null;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">        }<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Request and response lengths are both under 150 characters, so pretty short, and I set the intervals at 50 seconds, since Nginx’s default timeout is 60 seconds.<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Fri, Oct 6, 2017 at 6:39 AM, Mundkowsky, Robert <<a href="mailto:rmundkowsky@ets.org" target="_blank">rmundkowsky@ets.org</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><a name="m_-3133951273382688041_m_5443940142988388462_m_-835003064064081181__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Have you checked if Nginx has timeout settings and/or
 keep alive settings?</span></a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F10550558%2Fnginx-tcp-websockets-timeout-keepalive-config&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=5Ds%2BMnxK3AzpWTZ0JEfO3taJPp16uIK2UdKWfTLcvJg%3D&reserved=0" target="_blank"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">https://stackoverflow.com/ques<wbr>tions/10550558/nginx-tcp-webso<wbr>ckets-timeout-keepalive-config</span></a><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Robert
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> FreeSWITCH-users [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounc<wbr>es@lists.freeswitch.org</a>]
<b>On Behalf Of </b>Chad Phillips<br>
<b>Sent:</b> Thursday, October 5, 2017 11:07 PM<br>
<b>To:</b> FreeSWITCH Users Help <<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freesw<wbr>itch.org</a>><br>
<b>Subject:</b> [Freeswitch-users] Sending keepalives on Verto websocket</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">I've switched to using Nginx to proxy Verto websockets, and have run into a small snag: by default, if Nginx doesn't read any data from a proxy backend within 60 seconds, it closes
 the connection, even for websockets.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">It appears the recommended solution is to have the server send some kind of regular keepalive. I poked around in mod_verto.c and found a 'request.keepalive' variable, but I'm unclear
 how to set that in the request, and/or if it even accomplishes what I'm wanting.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I've solved the issue for now by periodically sending a JSON RPC 'echo' request along the websocket every 50 seconds, and the reply from the server is enough to keep the connection
 open. This is fine, but I am curious if there's a way to do it just from the server side, and if not, if it's worth it to add a setting to enable that functionality?<u></u><u></u></p>
</div>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p>This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender;
 do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p>Thank you for your compliance.<u></u><u></u></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
</div>
<p class="MsoNormal"><br>
______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freeswitchsolutions.com&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=lU2FKQRT3CeYO3I3BDVVm%2FPT5L%2B5giXo6TtSi%2BtCjjE%3D&reserved=0" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freeswitch.org&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=VO5vSjIT%2FrMosRlH%2FBeS%2F9iMeqEtE2vFBewgVdte0i4%3D&reserved=0" target="_blank">http://www.freeswitch.org</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fconfluence.freeswitch.org&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=GMTRoR%2BARpYEeNqMFGxtZUh%2Fn8zEPp48GsSVnEzu3jY%3D&reserved=0" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cluecon.com&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=476%2FcDE%2FuuaSBtjW1CNbi64%2F%2BguBdR%2FpjKHPgDKQ%2FOA%3D&reserved=0" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Flistinfo%2Ffreeswitch-users&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=oy0%2BWsQ27yZtS8eFiT%2FbABLWpdXq0SX%2BcuIdCKDOOnw%3D&reserved=0" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.freeswitch.org%2Fmailman%2Foptions%2Ffreeswitch-users&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=kinRx3a5NkCUaR2HmW5tLnT1HBZDSlgJToppc%2Fi6FMA%3D&reserved=0" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freeswitch.org&data=02%7C01%7Crmundkowsky%40ets.org%7C8340e5ebbbbe4d94bb6b08d50cfcf688%7C0ba6e9b760b34fae92f37e6ddd9e9b65%7C0%7C0%7C636429202964109077&sdata=VO5vSjIT%2FrMosRlH%2FBeS%2F9iMeqEtE2vFBewgVdte0i4%3D&reserved=0" target="_blank">http://www.freeswitch.org</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>
<hr>
<p>This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender;
 do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.</p>
<br>
<p>Thank you for your compliance.</p>
<hr>
</div>

<br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions<wbr>.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.o<wbr>rg</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswi<wbr>tch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/ma<wbr>ilman/listinfo/freeswitch-user<wbr>s</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.frees<wbr>witch.org/mailman/options/<wbr>freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Ítalo Rossi<div><a href="mailto:italo@freeswitch.org" target="_blank">italo@freeswitch.org</a></div></div></div>
</div>