Welcome! Log In Create A New Profile

Advanced

Re: Need help: websocket proxy stops working after a while

Maxim Dounin
June 04, 2013 06:46AM
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@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Need help: websocket proxy stops working after a while

Alder Network June 03, 2013 06:26PM

Re: Need help: websocket proxy stops working after a while

Maxim Dounin June 04, 2013 06:46AM

Re: Need help: websocket proxy stops working after a while

Alder Network June 07, 2013 05:56PM

Re: Need help: websocket proxy stops working after a while

phil3361 April 04, 2014 04:20AM

Re: Need help: websocket proxy stops working after a while

Maxim Dounin April 04, 2014 06:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 331
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready