Daryl Aranha
Daryl Aranha

Reputation: 106

What value to set for proxy_read_timeout in Nginx to prevent WebSocket timeout in browser

The browser kept disconnecting the socket connection after a minute. I am using Ratchet in the server-side and autobahn js on the client-side.

After a minute of unuse, the socket disconnected with 1006 error code, and during my research, I found that I need to set proxy_read_timeout to a higher value. My concern to what value should it be set and what happens after its timeout do I need to refresh the browser again?

Upvotes: 1

Views: 1525

Answers (1)

IVO GELOV
IVO GELOV

Reputation: 14269

You can try with 86400 but I would recommend to check and ensure that your server-side software sends PING packets at regular interval to the browser. OR your client-side code sends PING packets at regular interval to the server.

Upvotes: 2

Related Questions