GAE App Engine Websocket clients are disconnected after 1 hour

时光怂恿深爱的人放手 提交于 2021-01-27 19:45:30

问题


I have a simple Websocket server deployed to AppEngine, after exactly 1 hour clients are disconnected with error code 1006, I believe this is happening because of the nginx load balancer, I have tried changing nginx-app.conf, but it didn't help

  proxy_send_timeout 7d;
  proxy_read_timeout 7d;

My server is sending ping / pong frames every 10 seconds, so inactivity is out of the question.

The official GAE documentation states this:

"WebSockets are always available to your application without any additional setup. Once a WebSockets connection is established, it will time out after one hour."

But there is no information about how to circumvent this.

How can I ensure that my socket stay alive for an unlimited amount of time?

来源:https://stackoverflow.com/questions/62038417/gae-app-engine-websocket-clients-are-disconnected-after-1-hour

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