[Freeswitch-users] Sending keepalives on Verto websocket

Chad Phillips chad at apartmentlines.com
Fri Oct 6 03:06:33 UTC 2017


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.

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.

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20171005/7226a029/attachment.html>


More information about the FreeSWITCH-users mailing list