问题
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