Need help: websocket proxy stops working after a while

Alder Network aldernetwork at gmail.com
Fri Jun 7 21:54:28 UTC 2013


Thanks for the info.

For 2) , it would be nice to accept value of -1 ( or 0 ) for
proxy_read_timeout as indefinite, namely no timeout checking
at proxy.


On Tue, Jun 4, 2013 at 3:45 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Mon, Jun 03, 2013 at 03:24:52PM -0700, Alder Network wrote:
>
> >   I got nginx websocket proxy working but the socket would close
> > in a minute or so. So I add
> > proxy_read_timeout 180s;
> > and it works within 3 minutes but closed the websocket after 3
> > minutes, but it works OK before that. Why is that?
> > BTW, I am using Nginx 1.4 now.
>
> Much like with normal http, nginx will time out connection to the
> upstream server if it doesn't see any data from it.  If with a
> backend you use there are no data expected from the backend to a
> client, there are two possible solutions:
>
> 1) Send periodic ping frames from the backend.
>
> 2) Configure higher proxy_read_timeout in a location where
> websocket connections are handled.
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130607/2cb9233b/attachment.html>


More information about the nginx mailing list