matrix-org / synapse

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

Keeps retrying to do the same request every 30 seconds #16371

Closed kroeckx closed 1 year ago

kroeckx commented 1 year ago

Description

My log is full of things like:

2023-09-23 10:33:01,077 - synapse.http.matrixfederationclient - 808 - WARNING - _maybe_retry_device_resync-158- {GET-O-23341} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 10:33:01,077 - synapse.handlers.device - 1312 - WARNING - _maybe_retry_device_resync-158- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found
2023-09-23 10:33:31,073 - synapse.http.matrixfederationclient - 808 - WARNING - _maybe_retry_device_resync-159- {GET-O-23405} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 10:33:31,073 - synapse.handlers.device - 1312 - WARNING - _maybe_retry_device_resync-159- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found
2023-09-23 10:34:01,077 - synapse.http.matrixfederationclient - 808 - WARNING - _maybe_retry_device_resync-160- {GET-O-23476} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 10:34:01,077 - synapse.handlers.device - 1312 - WARNING - _maybe_retry_device_resync-160- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found
2023-09-23 10:34:31,188 - synapse.http.matrixfederationclient - 808 - WARNING - _maybe_retry_device_resync-161- {GET-O-23541} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 10:34:31,188 - synapse.handlers.device - 1312 - WARNING - _maybe_retry_device_resync-161- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found

It seems to be retrying the same thing every 30 seconds without backing off.

Checking logs from just before the restart, it was:

2023-09-23 04:59:55,562 - synapse.http.matrixfederationclient - 805 - WARNING - _maybe_retry_device_resync-4890- {GET-O-5696944} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 04:59:55,562 - synapse.handlers.device - 1304 - WARNING - _maybe_retry_device_resync-4890- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found
2023-09-23 05:00:55,587 - synapse.http.matrixfederationclient - 805 - WARNING - _maybe_retry_device_resync-4891- {GET-O-5698427} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 05:00:55,588 - synapse.handlers.device - 1304 - WARNING - _maybe_retry_device_resync-4891- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found
2023-09-23 05:01:55,547 - synapse.http.matrixfederationclient - 805 - WARNING - _maybe_retry_device_resync-4892- {GET-O-5700142} [rebase.cz] Request failed: GET matrix-federation://rebase.cz/_matrix/federation/v1/user/devices/%40stinovlas%3Arebase.cz: HttpResponseException('404: Not Found')
2023-09-23 05:01:55,548 - synapse.handlers.device - 1304 - WARNING - _maybe_retry_device_resync-4892- Failed to handle device list update for @stinovlas:rebase.cz: 404: Not Found

That looks like after almost 5000 attempts, it's still trying every minute.

The current version is 1.92, the previous version was 1.90.

Steps to reproduce

Nothing

Homeserver

roeckx.be

Synapse Version

1.92.0

Installation Method

Other (please mention below)

Database

PostgreSQL

Workers

Single process

Platform

Debian, using the package in Debian.

Configuration

Presence is enabled

Relevant log output

See above

Anything else that would be useful to know?

No response

clokep commented 1 year ago

I think this is fixed in the next version (see #16252). It could be worth trying v1.93.0rc1.

kroeckx commented 1 year ago

The changelog there says it's related to workers, I don't have any workers.

clokep commented 1 year ago

Duplicate of #9603.