Gorilla WebSocket disconnects after a minute

不问归期 提交于 2019-12-03 02:55:28

I had the same issue, the problem is the nginx configuration. It defaults to a 1 minute read timeout for proxy_pass:

Syntax: proxy_read_timeout time;

Default: proxy_read_timeout 60s;

Context: http, server, location

See http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout

In my case I've increased the timeout to 10 hours:

proxy_read_timeout 36000s;

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!