, websocket had the problem of shutting down itself.
so I nginx used:
location /wss { -sharp websocket
proxy_read_timeout 36000s;
doesn"t seem to have any effect.
so I regularly send client requests at the front end:
setInterval(() => {
ws.send(JSON.stringify(params));
}, 50000);
is effective.
but once mobile browsers switch to other applications, websocket will automatically close after 50 seconds.
I wonder why websocket or http protocols are all keep-alive persistent connections