matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Sending messages to Android devices takes too long #16598

Open taiBsu opened 12 months ago

taiBsu commented 12 months ago

Description

I have set up my own matrix synapse server through docker-compose:

version: "3"

services:
  app:
    image: matrixdotorg/synapse
    container_name: matrix
    restart: always
    ports:
      - 8008:8008
    volumes:
      - /my_folder/matrix:/data
    depends_on:
      - postgres
    networks:
      - my_network
  postgres:
    image: postgres
    restart: always
    container_name: matrix_postgres
    volumes:
      - /my_folder/pgdata:/var/lib/postgresql/data
      - /my_folder/postgresql.conf:/usr/share/postgresql/postgresql.conf
    env_file:
      - .env
    ports:
      - 5432:5432
    networks:
      - my_network

networks:
  my_network:
    external: true

Everything works, however sending messages through Android devices using Element takes more than a minute to be delivered. Making audio and video calls is impossible. When using element.io on a desktop PC as a client, sending messages and making calls works flawlessly.

I created a subdomain called matrix.my_domain.org to communicate with my server using an apache2 reverse-proxy that leads to the docker container.

Steps to reproduce

Homeserver

my personal homeserver (Xubuntu 22.04) using docker-compose

Synapse Version

1.95.1

Installation Method

Docker (matrixdotorg/synapse)

Database

PostgreSQL (single server inside docker), no ported SQLite dbs, no restored backups

Workers

I don't know

Platform

Server: Xubuntu 22.04

Configuration

No response

Relevant log output

matrix_postgres  | 2023-11-04 23:29:05.606 UTC [755] FATAL:  password authentication failed for user "yyyy"
matrix_postgres  | 2023-11-04 23:29:05.606 UTC [755] DETAIL:  Role "yyyy" does not exist.
matrix_postgres  |  Connection matched file "/var/lib/postgresql/data/pg_hba.conf" line 128: "host all all all scram-sha-256"
matrix           | 2023-11-04 23:29:07,361 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,363 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,364 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,364 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,365 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,371 - synapse.access.http.8008 - 465 - INFO - GET-4860 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.005sec/0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 2B 200 "GET /_matrix/client/r0/thirdparty/protocols HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:07,374 - synapse.http.server - 124 - INFO - GET-4859 - <XForwardedForRequest at 0x7fa2c8db59d0 method='GET' uri='/_matrix/client/unstable/room_keys/version' clientproto='HTTP/1.1' site='8008'> SynapseError: 404 - No backup found
matrix           | 2023-11-04 23:29:07,375 - synapse.access.http.8008 - 465 - INFO - GET-4859 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.009sec/0.001sec (0.000sec, 0.000sec) (0.001sec/0.001sec/1) 51B 404 "GET /_matrix/client/unstable/room_keys/version HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:07,375 - synapse.access.http.8008 - 465 - INFO - GET-4858 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.010sec/0.001sec (0.001sec, 0.000sec) (0.001sec/0.002sec/1) 422B 200 "GET /_matrix/client/r0/pushers HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:07,376 - synapse.access.http.8008 - 465 - INFO - GET-4856 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.013sec/0.001sec (0.001sec, 0.001sec) (0.002sec/0.006sec/5) 456B 200 "GET /_matrix/client/r0/devices HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:07,382 - synapse.access.http.8008 - 465 - INFO - GET-4857 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.018sec/0.000sec (0.001sec, 0.001sec) (0.002sec/0.005sec/5) 810B 200 "GET /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/event/$IJ0YHAxwEPPWg6RZ4D-6feWwy4MzFSmjLDHnnEUccyQ HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [1 dbevts]
matrix           | 2023-11-04 23:29:07,787 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:07,812 - synapse.access.http.8008 - 465 - INFO - GET-4861 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.025sec/0.000sec (0.004sec, 0.002sec) (0.002sec/0.011sec/11) 2439B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=offline&timeout=0&since=s238_955_16_116_275_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [1 dbevts]
matrix           | 2023-11-04 23:29:08,144 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:08,149 - synapse.access.http.8008 - 465 - INFO - POST-4862 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.004sec/0.000sec (0.000sec, 0.001sec) (0.001sec/0.002sec/3) 2862B 200 "POST /_matrix/client/r0/keys/query HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:09,199 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:09,203 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:09,208 - synapse.access.http.8008 - 465 - INFO - PUT-4864 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.003sec/0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/1) 2B 200 "PUT /_matrix/client/v3/rooms/!AbCdEfGh:matrix.my_domain.org/typing/@yyyy:matrix.my_domain.org HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:09,213 - synapse.access.http.8008 - 465 - INFO - GET-4852 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 9.988sec/0.003sec (0.002sec, 0.000sec) (0.001sec/0.002sec/2) 584B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s241_1065_25_117_282_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:09,213 - synapse.access.http.8008 - 465 - INFO - GET-4854 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 9.486sec/0.002sec (0.003sec, 0.000sec) (0.001sec/0.002sec/2) 584B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s241_1065_25_117_282_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:09,223 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:09,226 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:09,694 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:09,694 - synapse.api.auth.internal - 288 - WARNING - GET-4867 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.
matrix           | 2023-11-04 23:29:09,695 - synapse.http.server - 124 - INFO - GET-4867 - <XForwardedForRequest at 0x7fa2cb79bc90 method='GET' uri='/_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000' clientproto='HTTP/1.1' site='8008'> SynapseError: 401 - Invalid access token passed.
matrix           | 2023-11-04 23:29:09,695 - synapse.access.http.8008 - 465 - INFO - GET-4867 - 91.17.5.210 - 8008 - {None} Processed request: 0.001sec/0.000sec (0.002sec, 0.000sec) (0.000sec/0.000sec/0) 88B 401 "GET /_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000 HTTP/1.1" "Go-http-client/1.1" [0 dbevts]
matrix           | 2023-11-04 23:29:09,732 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,224 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,228 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,269 - synapse.access.http.8008 - 465 - INFO - PUT-4870 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.040sec/0.001sec (0.005sec, 0.001sec) (0.003sec/0.007sec/8) 59B 200 "PUT /_matrix/client/v3/rooms/!AbCdEfGh:matrix.my_domain.org/send/m.room.encrypted/m1699140552201.60 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:12,275 - synapse.federation.sender - 592 - INFO - process_event_queue_for_federation-52 - Unexpectedly did not have cached prev group for $o-9K2NIjdsTKbw1T481P8jo-QVTuVa0zw86HzE9wT5Q
matrix           | 2023-11-04 23:29:12,277 - synapse.push.httppusher - 230 - INFO - httppush.process-34 - Processing 1 unprocessed push actions for @xxx:matrix.my_domain.org/im.vector.app.android/eHhIUCAbQvSn8DFfRyGRfj:APA91bHPc6Hnto6TM5Eo2m5h1M8bKKG130C6zCFO6Qa82WgZnvfUkQHv2ZKIqdYnwdaU2obzi6a8tb_XH4AoGkoJa4HCexwkSIqMu5Op1Cd58xIg3NLiy5BxjAHv1SGwf4G2Z7Wk5Fzq starting at stream_ordering 241
matrix           | 2023-11-04 23:29:12,284 - synapse.access.http.8008 - 465 - INFO - GET-4866 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 3.056sec/0.001sec (0.002sec, 0.000sec) (0.004sec/0.004sec/3) 1272B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s241_1065_26_117_282_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:12,286 - synapse.access.http.8008 - 465 - INFO - GET-4868 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 2.550sec/0.004sec (0.002sec, 0.002sec) (0.003sec/0.013sec/4) 1235B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s241_1065_26_117_282_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:12,303 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,307 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,358 - synapse.http.client - 413 - INFO - httppush.process-34 - Received response to POST https://matrix.org/_matrix/push/v1/notify: 200
matrix           | 2023-11-04 23:29:12,474 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,482 - synapse.access.http.8008 - 465 - INFO - GET-4873 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.007sec/0.000sec (0.001sec, 0.001sec) (0.001sec/0.004sec/4) 785B 200 "GET /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/event/$o-9K2NIjdsTKbw1T481P8jo-QVTuVa0zw86HzE9wT5Q HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:12,554 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,557 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,566 - synapse.access.http.8008 - 465 - INFO - POST-4875 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.008sec/0.001sec (0.001sec, 0.001sec) (0.001sec/0.003sec/4) 2B 200 "POST /_matrix/client/v3/rooms/!AbCdEfGh:matrix.my_domain.org/read_markers HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:12,572 - synapse.access.http.8008 - 465 - INFO - GET-4872 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.265sec/0.000sec (0.003sec, 0.001sec) (0.002sec/0.004sec/5) 632B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s242_1065_26_117_282_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:12,584 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,588 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,705 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,717 - synapse.access.http.8008 - 465 - INFO - GET-4878 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.011sec/0.000sec (0.003sec, 0.002sec) (0.001sec/0.006sec/3) 1281B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=offline&timeout=0&since=s241_1065_25_117_282_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:12,922 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:12,928 - synapse.access.http.8008 - 465 - INFO - GET-4879 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.005sec/0.000sec (0.002sec, 0.000sec) (0.001sec/0.002sec/4) 632B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s242_1065_26_117_282_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:13,350 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:14,796 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:14,797 - synapse.access.http.8008 - 465 - INFO - GET-4881 - 95.90.173.144 - 8008 - {None} Processed request: 0.000sec/0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 857B 200 "GET /_matrix/client/versions HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:14,844 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:14,851 - synapse.access.http.8008 - 465 - INFO - PUT-4882 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.007sec/0.001sec (0.001sec, 0.000sec) (0.001sec/0.003sec/3) 2B 200 "PUT /_matrix/client/r0/user/@xxx:matrix.my_domain.org/account_data/im.vector.setting.breadcrumbs HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:15,059 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:15,074 - synapse.access.http.8008 - 465 - INFO - GET-4883 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.014sec/0.000sec (0.002sec, 0.002sec) (0.001sec/0.008sec/9) 1290B 200 "GET /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/messages?from=t3-173_931_16_114_271_1_73_49_0_1&dir=b&limit=16&filter=%7B%22lazy_load_members%22%3Atrue%7D HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:17,526 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:17,539 - synapse.access.http.8008 - 465 - INFO - PUT-4885 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.011sec/0.002sec (0.001sec, 0.001sec) (0.001sec/0.004sec/4) 2B 200 "PUT /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/typing/@xxx:matrix.my_domain.org HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:17,542 - synapse.access.http.8008 - 465 - INFO - GET-4880 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 4.190sec/0.001sec (0.002sec, 0.000sec) (0.002sec/0.003sec/2) 738B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s242_1065_26_117_283_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:17,542 - synapse.access.http.8008 - 465 - INFO - GET-4877 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 4.953sec/0.001sec (0.001sec, 0.001sec) (0.003sec/0.004sec/3) 368B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s242_1065_26_117_283_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:17,572 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:17,576 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:17,580 - synapse.access.http.8008 - 465 - INFO - GET-4887 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.004sec/0.000sec (0.001sec, 0.000sec) (0.000sec/0.001sec/1) 606B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s242_1066_26_117_284_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:17,596 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:17,599 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:17,709 - synapse.metrics._gc - 120 - INFO - sentinel - Collecting gc 1
matrix           | 2023-11-04 23:29:18,121 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:19,720 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:19,720 - synapse.api.auth.internal - 288 - WARNING - GET-4891 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.
matrix           | 2023-11-04 23:29:19,720 - synapse.http.server - 124 - INFO - GET-4891 - <XForwardedForRequest at 0x7fa2c710f010 method='GET' uri='/_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000' clientproto='HTTP/1.1' site='8008'> SynapseError: 401 - Invalid access token passed.
matrix           | 2023-11-04 23:29:19,721 - synapse.access.http.8008 - 465 - INFO - GET-4891 - 91.17.5.210 - 8008 - {None} Processed request: 0.001sec/0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 88B 401 "GET /_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000 HTTP/1.1" "Go-http-client/1.1" [0 dbevts]
matrix           | 2023-11-04 23:29:21,357 - synapse.storage.databases.main.event_push_actions - 1307 - INFO - rotate_notifs-331 - Rotating notifications
matrix           | 2023-11-04 23:29:21,358 - synapse.storage.databases.main.event_push_actions - 1511 - INFO - rotate_notifs-331 - Rotating notifications up to: 242
matrix           | 2023-11-04 23:29:21,360 - synapse.storage.databases.main.event_push_actions - 1597 - INFO - rotate_notifs-331 - Rotating notifications, handling 1 rows
matrix           | 2023-11-04 23:29:21,364 - synapse.storage.databases.main.event_push_actions - 1682 - INFO - rotate_notifs-331 - Rotating notifications, deleted 0 push actions
matrix           | 2023-11-04 23:29:21,406 - synapse.handlers.presence - 902 - INFO - persist_presence_changes-164 - Persisting 1 unpersisted presence updates
matrix           | 2023-11-04 23:29:21,414 - synapse.util.caches.lrucache - 210 - INFO - LruCache._expire_old_entries-331 - Dropped 0 items from caches
matrix           | 2023-11-04 23:29:21,907 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:21,952 - synapse.access.http.8008 - 465 - INFO - PUT-4892 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.041sec/0.004sec (0.005sec, 0.001sec) (0.003sec/0.007sec/10) 59B 200 "PUT /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/send/m.room.encrypted/$local.4334636a-5e75-443e-924f-e1e95b37654b HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:21,955 - synapse.federation.sender - 592 - INFO - process_event_queue_for_federation-53 - Unexpectedly did not have cached prev group for $Vq9X0sJ-2Ij1p04sBnHj8T2Hw9uaWhefwh9Y2tnSeSw
matrix           | 2023-11-04 23:29:21,957 - synapse.push.httppusher - 230 - INFO - httppush.process-35 - Processing 0 unprocessed push actions for @xxx:matrix.my_domain.org/im.vector.app.android/eHhIUCAbQvSn8DFfRyGRfj:APA91bHPc6Hnto6TM5Eo2m5h1M8bKKG130C6zCFO6Qa82WgZnvfUkQHv2ZKIqdYnwdaU2obzi6a8tb_XH4AoGkoJa4HCexwkSIqMu5Op1Cd58xIg3NLiy5BxjAHv1SGwf4G2Z7Wk5Fzq starting at stream_ordering 242
matrix           | 2023-11-04 23:29:21,966 - synapse.access.http.8008 - 465 - INFO - GET-4890 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 3.843sec/0.001sec (0.002sec, 0.000sec) (0.004sec/0.008sec/4) 1899B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s242_1066_27_117_284_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:21,967 - synapse.access.http.8008 - 465 - INFO - GET-4889 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 4.366sec/0.001sec (0.002sec, 0.001sec) (0.006sec/0.004sec/4) 1899B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s242_1066_27_117_284_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:22,016 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,020 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,022 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,023 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,030 - synapse.access.http.8008 - 465 - INFO - POST-4895 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.007sec/0.000sec (0.003sec, 0.000sec) (0.001sec/0.005sec/4) 2256B 200 "POST /_matrix/client/v3/keys/query HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:22,144 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,148 - synapse.access.http.8008 - 465 - INFO - PUT-4897 - 95.90.173.144 - 8008 - {@xxx:matrix.my_domain.org} Processed request: 0.003sec/0.001sec (0.001sec, 0.000sec) (0.000sec/0.001sec/1) 2B 200 "PUT /_matrix/client/r0/rooms/!AbCdEfGh:matrix.my_domain.org/typing/@xxx:matrix.my_domain.org HTTP/1.1" "Element/1.6.6 (samsung SM-S916B; Android 13; TP1A.220624.014.S916BXXS3AWIF; Flavour GooglePlay; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:22,151 - synapse.access.http.8008 - 465 - INFO - GET-4896 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.127sec/0.001sec (0.000sec, 0.000sec) (0.001sec/0.002sec/2) 584B 200 "GET /_matrix/client/v3/sync?filter=0&timeout=30000&since=s243_1067_27_117_284_1_73_49_0_1 HTTP/1.1" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.47 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36" [0 dbevts]
matrix           | 2023-11-04 23:29:22,160 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,163 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,337 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,342 - synapse.access.http.8008 - 465 - INFO - POST-4900 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.004sec/0.000sec (0.000sec, 0.001sec) (0.001sec/0.002sec/3) 2256B 200 "POST /_matrix/client/r0/keys/query HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:22,830 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:22,835 - synapse.access.http.8008 - 465 - INFO - GET-4901 - 91.17.5.210 - 8008 - {@yyyy:matrix.my_domain.org} Processed request: 0.004sec/0.000sec (0.002sec, 0.000sec) (0.000sec/0.001sec/1) 584B 200 "GET /_matrix/client/r0/sync?filter=0&set_presence=online&timeout=30000&since=s243_1067_27_117_284_1_73_49_0_1 HTTP/1.1" "Element/1.6.6 (samsung SM-G970F; Android 12; e_beyond0lte-user 12 SQ3A.220705.004 eng.root.20231019.095711 dev-keys; Flavour FDroid; MatrixAndroidSdk2 1.6.6)" [0 dbevts]
matrix           | 2023-11-04 23:29:23,364 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:29,747 - synapse.http.site - 573 - WARNING - sentinel - forwarded request lacks an x-forwarded-proto header: assuming https
matrix           | 2023-11-04 23:29:29,748 - synapse.api.auth.internal - 288 - WARNING - GET-4903 - Invalid access token in auth: <class 'pymacaroons.exceptions.MacaroonDeserializationException'> cannot determine data format of binary-encoded macaroon.
matrix           | 2023-11-04 23:29:29,748 - synapse.http.server - 124 - INFO - GET-4903 - <XForwardedForRequest at 0x7fa2cb794e50 method='GET' uri='/_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000' clientproto='HTTP/1.1' site='8008'> SynapseError: 401 - Invalid access token passed.
matrix           | 2023-11-04 23:29:29,749 - synapse.access.http.8008 - 465 - INFO - GET-4903 - 91.17.5.210 - 8008 - {None} Processed request: 0.001sec/0.000sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 88B 401 "GET /_matrix/client/r0/sync?filter=1&since=s193_8321_0_108_356_1_303_138_0_1&timeout=30000 HTTP/1.1" "Go-http-client/1.1" [0 dbevts]

Anything else that would be useful to know?

No response

clokep commented 11 months ago

forwarded request lacks an x-forwarded-proto header: assuming https

Probably unrelated, but please configure your reverse proxy properly. (Note the RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}).

Everything works, however sending messages through Android devices using Element takes more than a minute to be delivered. Making audio and video calls is impossible. When using element.io on a desktop PC as a client, sending messages and making calls works flawlessly.

This sounds quite unlikely to be a Synapse issue if it is working well from the desktop client. It looks like when the requests reach Synapse they're being processed fairly quickly. Is there something in particular in the log output that is concerning to you?