On my installation, all users are affected, but not all of them are affected in the same amount.
/opt/mattermost/logs# sed -n 's/^.*websocket.NextReader: closing websocket.*user_id":"\(.*\)","error.*/\1/p' mattermost.log | sort | uniq -c | sort -rn
17378 mh8cpr6
6361 ohi4em7e
2380 rci5uaf8m
1946 8eqkwgzb
1583 h3g135wfj
1577 5if8s5mef
1563 9mouf11z
1380 kzgzrbmji
1317 fix4z134a
1135 eyworaz4
1115 pbn935bf
955 zgfsxq7x
953 xyz7jwdf
925 i98me8y
907 t6xjdqop3f
My user account had only like 150 such entries in the log and so I diagnosed it and this is what I can see for the last few days:
{"timestamp":"2022-07-11 06:15:31.866 +02:00",
{"timestamp":"2022-07-11 14:55:54.248 +02:00",
{"timestamp":"2022-07-11 14:59:25.462 +02:00",
{"timestamp":"2022-07-11 15:04:32.605 +02:00",
{"timestamp":"2022-07-11 15:04:33.636 +02:00",
{"timestamp":"2022-07-11 15:06:19.389 +02:00",
{"timestamp":"2022-07-11 17:46:13.546 +02:00",
{"timestamp":"2022-07-12 05:53:38.584 +02:00",
{"timestamp":"2022-07-13 06:25:25.948 +02:00",
{"timestamp":"2022-07-13 06:43:48.905 +02:00",
{"timestamp":"2022-07-13 06:44:27.865 +02:00",
{"timestamp":"2022-07-13 21:01:40.897 +02:00",
{"timestamp":"2022-07-14 05:51:45.557 +02:00",
{"timestamp":"2022-07-14 06:28:15.350 +02:00",
{"timestamp":"2022-07-14 17:17:50.615 +02:00",
{"timestamp":"2022-07-14 20:03:41.561 +02:00",
{"timestamp":"2022-07-14 20:35:31.844 +02:00",
{"timestamp":"2022-07-15 00:24:29.425 +02:00",
{"timestamp":"2022-07-15 00:31:13.750 +02:00",
{"timestamp":"2022-07-15 07:33:10.310 +02:00",
{"timestamp":"2022-07-15 17:19:57.594 +02:00",
{"timestamp":"2022-07-15 17:35:54.330 +02:00",
{"timestamp":"2022-07-15 18:53:51.199 +02:00",
{"timestamp":"2022-07-15 22:34:50.884 +02:00",
{"timestamp":"2022-07-16 07:07:49.520 +02:00",
{"timestamp":"2022-07-16 07:46:27.055 +02:00",
{"timestamp":"2022-07-16 15:48:36.481 +02:00",
{"timestamp":"2022-07-18 05:41:34.132 +02:00",
{"timestamp":"2022-07-18 06:52:01.837 +02:00",
{"timestamp":"2022-07-19 05:59:29.288 +02:00",
I compare that with my calendar and all the logs where caused by the mobile client on my iPhone when it lost its connection or when I was roaming (leaving the office, switching between offices and devices, etc.) there’s no single log entry during the day when I’m connected via WIFI or LAN, as long as I do not move and the client does not lose its connection. One of the entries always happens when I put my workstation to hibernate, so the timeouts on the reverse proxy seem to be OK here for me; I need to talk to the guy with 17k disconnects though, not sure what’s going on there
Anyways, seeing this data I was able to reproduce the log entry.
I spun up a demo installation (7.1.1) on my server, added the account on my mobile 2.0 client, connected, all good. Then I turned off wifi, waited for ~ 3 mins and bam:
{"timestamp":"2022-07-19 10:33:00.810 +02:00","level":"error","msg":"websocket.NextReader: closing websocket","caller":"app/web_conn.go:830","user_id":"u8ggjxjp17dejxfhe9fsue5ssh","error":"read tcp 127.0.0.1:8065->127.0.0.1:51704: i/o timeout"}