pythonnz / chat

NZPUG's chat server: https://chat.python.nz
1 stars 1 forks source link

Riot or Matrix Timing out when connecting to large homeservers such as matrix.org #21

Closed iokiwi closed 4 years ago

iokiwi commented 4 years ago

Try to join MatrixHQ:matrix.org

Sits for ages trying to connect any may or may not eventually fail.

image

Shows cannot reach home server even in local channels

image

Potentially a problem with request / response size?

image

Works ok on riot.im webclient

image

iokiwi commented 4 years ago

Or may be an issue with maximum response size

iokiwi commented 4 years ago

Errors in /var/log/nginx/error.log

2020/04/12 04:20:40 [crit] 12022#12022: *21767 open() "/var/lib/nginx/proxy/4/45/0000001454" failed (13: Permission denied) while reading upstream, client: 122.58.41.2, server: chat.python.nz, request: "GET /_matrix/client/r0/sync?filter=0&timeout=0&since=s1515_469966_0_1870_1872_5_1_1375_1 HTTP/1.1", upstream: "http://127.0.0.1:8008/_matrix/client/r0/sync?filter=0&timeout=0&since=s1515_469966_0_1870_1872_5_1_1375_1", host: "chat.python.nz"

Followed this suggestion https://serverfault.com/questions/235154/permission-denied-while-reading-upstream

Found permission problems

ubuntu@synapse-homeserver:~$ ls -la /var/lib/nginx/proxy/
ls: cannot open directory '/var/lib/nginx/proxy/': Permission denied
ubuntu@synapse-homeserver:~$ sudo ls -la /var/lib/nginx/proxy/
total 48
drwx------ 12 www-data root    4096 Jun 14  2018 .
drwxr-xr-x  7 root     root    4096 Jun 10  2018 ..
drwx------  6 nobody   nogroup 4096 Jun 16  2018 0
drwx------  6 nobody   nogroup 4096 Jun 16  2018 1
drwx------  7 nobody   nogroup 4096 Jun 16  2018 2
drwx------  4 nobody   nogroup 4096 Jun 11  2018 3
drwx------  6 nobody   nogroup 4096 Jun 14  2018 4
drwx------  5 nobody   nogroup 4096 Jun 14  2018 5
drwx------  6 nobody   nogroup 4096 Jun 14  2018 6
drwx------  6 nobody   nogroup 4096 Jun 14  2018 7
drwx------  6 nobody   nogroup 4096 Jun 14  2018 8
drwx------  4 nobody   nogroup 4096 Jun 16  2018 9

Fix permission problems.

ubuntu@synapse-homeserver:~$ sudo chown -R www-data:www-data /var/lib/nginx/proxy/