Closed ELForcer closed 2 months ago
Hi @ELForcer, thanks for your report.
Do you have any workers configured? If you don't know, it's likely you don't.
For developers, here's the relevant bit of the code:
https://github.com/element-hq/synapse/pull/17211 may be a possible contender for the regression, as it's only been introduced in v1.109.0rc1 as touches nearby code (outbound device pokes).
@wrjlewis mentioned that a possible workaround is to run:
SELECT setval('device_lists_sequence', (
SELECT GREATEST(MAX(stream_id), 0) FROM device_lists_stream
));
And then start the server on v1.109.0rc1. However the code should still be fixed.
Edit: See the below comment for warnings on running this query.
@anoadragon453 That SQL should only be run if Synapse prompts you to do so, and while Synapse is offline. Moving streams can be quite dangerous if you get it wrong.
I think this an edge case with #17229, where we didn't include device_lists_changes_converted_stream_position
table in the new stream ID generator. I think the easiest fix is to just skip the assert.
Actually, I've changed tack, but PR up at https://github.com/element-hq/synapse/pull/17292
@ELForcer This should have been fixed in v1.109.0-rc2. Could you try upgrading and report back?
Hello. It's gotten worse at the moment. The matrix-synapse service no longer starts.
user@userver:/var/log/matrix-synapse$ systemctl status matrix-synapse
● matrix-synapse.service - Synapse Matrix homeserver
Loaded: loaded (/lib/systemd/system/matrix-synapse.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2024-06-11 21:44:12 +04; 2s ago
Process: 428001 ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys (code=exited, status=0/SUCCESS)
Process: 428006 ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ (code=exited, status=1/FAILURE)
Main PID: 428006 (code=exited, status=1/FAILURE)
CPU: 4.496s
Log:
2024-06-11 21:43:09,382 - root - 355 - WARNING - main - ***** STARTING SERVER *****
2024-06-11 21:43:09,382 - root - 356 - WARNING - main - Server /opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/app/homeserver.py version 1.109.0rc2
2024-06-11 21:43:09,383 - root - 361 - WARNING - main - Copyright (c) 2023 New Vector, Inc
2024-06-11 21:43:09,383 - root - 362 - WARNING - main - Licensed under the AGPL 3.0 license. Website: https://github.com/element-hq/synapse
2024-06-11 21:43:09,638 - synapse.storage.util.sequence - 180 - WARNING - main - Postgres sequence push_rules_stream_sequence is behind table push_rules_stream: 73 < 77
2024-06-11 21:43:09,639 - synapse.app._base - 220 - ERROR - main - Exception during startup
Traceback (most recent call last):
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/app/homeserver.py", line 359, in setup
hs.setup()
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/server.py", line 348, in setup
self.datastores = Databases(self.DATASTORE_CLASS, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/__init__.py", line 100, in __init__
main = main_store_class(database, db_conn, hs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/__init__.py", line 170, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/events_bg_updates.py", line 107, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/experimental_features.py", line 40, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/devices.py", line 1747, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/devices.py", line 95, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/roommember.py", line 1549, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 2207, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 1750, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 150, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/registration.py", line 2327, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/profile.py", line 44, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/presence.py", line 83, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/presence.py", line 64, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/transactions.py", line 81, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 751, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 109, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 549, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/event_federation.py", line 2064, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/media_repository.py", line 199, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/media_repository.py", line 112, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/filtering.py", line 49, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/event_push_actions.py", line 1896, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/metrics.py", line 75, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/event_push_actions.py", line 263, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/end_to_end_keys.py", line 1449, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/e2e_room_keys.py", line 60, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/search.py", line 435, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/search.py", line 144, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/account_data.py", line 68, in __init__
super().__init__(database, db_conn, hs)
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/databases/main/push_rule.py", line 143, in __init__
self._push_rules_stream_id_gen = MultiWriterIdGenerator(
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/util/id_generators.py", line 298, in __init__
self._sequence_gen.check_consistency(
File "/opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/storage/util/sequence.py", line 187, in check_consistency
raise IncorrectDatabaseSetup(
synapse.storage.engines._base.IncorrectDatabaseSetup:
Postgres sequence 'push_rules_stream_sequence' is inconsistent with associated
table 'push_rules_stream'. This can happen if Synapse has been downgraded and
then upgraded again, or due to a bad migration.
To fix this error, shut down Synapse (including any and all workers)
and run the following SQL:
SELECT setval('push_rules_stream_sequence', (
SELECT GREATEST(MAX(stream_id), 0) FROM push_rules_stream
));
See docs/postgres.md for more information.
My understanding is that it cannot automatically perform the operation:
SELECT setval('push_rules_stream_sequence', (
SELECT GREATEST(MAX(stream_id), 0) FROM push_rules_stream
));
and this SQL query needs to be executed independently?
At the moment I have rolled back to package version 1.108.0.
+1, I am also hitting this Postgres sequence 'push_rules_stream_sequence' is inconsistent with associated table 'push_rules_stream'. This can happen if Synapse has been downgraded and then upgraded again, or due to a bad migration.
error now after rolling between 1.108.0, 1.109.0rc1 and 1.109.0rc2 when I noticed that sync'ing stopped working after upgrading to 1.109.0rc2. Also have rolled back to 1.108.0 for now without running the query until we hear anything about potential next steps
I was able to reproduce locally. Steps to reproduce:
Database looks like this:
synapse=# select stream_id, event_stream_ordering, instance_name from push_rules_stream;
stream_id | event_stream_ordering | instance_name
-----------+-----------------------+---------------
2 | 10 |
3 | 12 |
4 | 13 | master
5 | 14 |
synapse=# select instance_name, stream_id from stream_positions where stream_name = 'push_rules_stream';
instance_name | stream_id
---------------+-----------
master | 4
Even simpler to trigger:
I believe we fixed this, debs for v1.109.0rc3 with the fix should be available in a few hours. If it indeed fixes your issue, we should be able to release v1.109.0 tomorrow
rc3 works fine for me. Sync seems to work fine, too. Not sure what the weirdness I saw with rc1/rc2 was about. Thanks :)
I confirm. Upgrading to 1.109.0rc3 no longer crashes the homeserver. Messages reach the recipient. There are no more errors in the Log.
2024-06-18 10:12:28,298 - root - 355 - WARNING - main - ***** STARTING SERVER *****
2024-06-18 10:12:28,298 - root - 356 - WARNING - main - Server /opt/venvs/matrix-synapse/lib/python3.11/site-packages/synapse/app/homeserver.py version 1.109.0rc3
2024-06-18 10:12:28,298 - root - 361 - WARNING - main - Copyright (c) 2023 New Vector, Inc
2024-06-18 10:12:28,299 - root - 362 - WARNING - main - Licensed under the AGPL 3.0 license. Website: https://github.com/element-hq/synapse
2024-06-18 10:12:28,587 - synapse.storage.util.sequence - 167 - WARNING - main - Postgres sequence push_rules_stream_sequence is behind table push_rules_stream: 73 < 89. Updating sequence.
2024-06-18 10:12:28,602 - synapse.storage.util.sequence - 167 - WARNING - main - Postgres sequence e2e_cross_signing_keys_sequence is behind table e2e_cross_signing_keys: 911 < 915. Updating sequence.
2024-06-18 10:12:28,716 - synapse.storage.util.sequence - 167 - WARNING - main - Postgres sequence device_lists_sequence is behind table device_lists_stream: 3598 < 3621. Updating sequence.
The task can be considered closed. Thank you all.
Just upgraded from 104.0 to 109.0 via the docker image (or rather a derived image with a simple change which installs the synapse-s3-storage-provider
package as well). No workers are configured. Shortly after starting, the log fills up with:
synapse.handlers.sync - 527 - WARNING - GET-1863- Timed out waiting for worker to catch up. Returning empty response
It seems there are no other related errors in the logs.
Afterwards, Element-X (on Android) does not sync any changes anymore, same with the nheko desktop client. Element web does seem to work correctly though.
For now, I downgraded to 108.0, which seems to fix all these problems, and synapse does not report the error anymore.
Ran into a very similar issue on updating to 109.0 via docker image as well, with messages delivery freezing entirely. This with only a federation-sender worker and one worker that handles the summary MSC endpoint.
Log contained;
synapse.handlers.sync - 527 - WARNING - GET-24096- Timed out waiting for worker to catch up. Returning empty response
...
synapse.notifier - 780 - INFO - GET-24113- Waiting for current token to reach StreamToken(room_key=RoomStreamToken(stream=1314143, instance_map=immutabledict({}), topological=None), presence_key=61707880, typing_key=8188, receipt_key=MultiWriterStreamToken(stream=3056248, instance_map=immutabledict({})), account_data_key=252093, push_rules_key=267, to_device_key=65220, device_list_key=7269565, groups_key=0, un_partial_stated_rooms_key=620); currently at StreamToken(room_key=RoomStreamToken(stream=1314372, instance_map=immutabledict({}), topological=None), presence_key=61725417, typing_key=165, receipt_key=MultiWriterStreamToken(stream=3056824, instance_map=immutabledict({})), account_data_key=252242, push_rules_key=267, to_device_key=65277, device_list_key=7272052, groups_key=0, un_partial_stated_rooms_key=588)
With the "Waiting for current token to reach StreamToken(...)" message being spammed rapidly.
In digging through it and the database, I found that the un_partial_stated_room_stream_sequence
was at 588 - and also only had data up until 588 in the stream, while the stream tokens that were trying to be reached wanted it to be at 620.
Stopping Synapse, updating the sequence manually, and then starting it up again seems to have resolved the pressing issue.
E.g.
SELECT setval('un_partial_stated_room_stream_sequence', 620);
I have the same issue. I only upgrade between full releases (no rc) and have been doing so for a while.
2024-06-25 13:51:16,302 - synapse.notifier - 780 - INFO - GET-147 - Waiting for current token to reach StreamToken(room_key=RoomStreamToken(stream=6450, instance_map=immutabledict({}), topological=None), presence_key=143808, typing_key=4, receipt_key=MultiWriterStreamToken(stream=7986, instance_map=immutabledict({})), account_data_key=2248, push_rules_key=27, to_device_key=19021, device_list_key=1122, groups_key=0, un_partial_stated_rooms_key=1); currently at StreamToken(room_key=RoomStreamToken(stream=6708, instance_map=immutabledict({}), topological=None), presence_key=144401, typing_key=0, receipt_key=MultiWriterStreamToken(stream=8026, instance_map=immutabledict({})), account_data_key=2274, push_rules_key=27, to_device_key=19012, device_list_key=1136, groups_key=0, un_partial_stated_rooms_key=1)
2024-06-25 13:51:16,804 - synapse.handlers.sync - 527 - WARNING - GET-147 - Timed out waiting for worker to catch up. Returning empty response
The server is not federated and un_partial_stated_rooms_key=1
is the same. And don't know if this matters but I don't use systemd.
@baconsalad Your log seems to list two keys out of phase;
waiting for .. typing_key=4, to_device_key=19021, .. currently at .. typing_key=0, to_device_key=19012,
I might have a reason & solution for my problem. After a recent reconfiguration, synapse was unable to reach my unified push server, leaving messages like this in the log:
synapse.push.httppusher - 416 - WARNING - httppush.process-793- Failed to push data to @REDACTED/im.vector.app.android/https://REDACTED/REDACTED?up=1: <class 'synapse.api.errors.HttpResponseException'> 504: Gateway Timeout
With versions < 1.109.0, this did not block messages from being forwarded to the client (apart from the push not working reliably). With 1.109.0, this probably does not work anymore, maybe because of https://github.com/element-hq/synapse/pull/17240? (Update: No, that's probably not the right PR.)
Just a theory for now. I fixed my configuration and will try the update again soon.
I think https://github.com/element-hq/synapse/pull/17386 should fix this :crossed_fingers:
I originally encountered this when upgrading from v1.108.0
to v1.109.0
, forcing me to rollback to v1.108.0
. I then upgraded to v1.110.0
when it was released, and the issue seemed to be resolved. However, I've just now discovered my homeserver is stuck with this issue again on v1.111.0
:
``` Starting synapse with args -m synapse.app.homeserver --config-path /config/homeserver.yaml 2024-07-24 16:51:23,537 - root - 355 - WARNING - main - ***** STARTING SERVER ***** 2024-07-24 16:51:23,537 - root - 356 - WARNING - main - Server /usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py version 1.111.0 2024-07-24 16:51:23,537 - root - 361 - WARNING - main - Copyright (c) 2023 New Vector, Inc 2024-07-24 16:51:23,537 - root - 362 - WARNING - main - Licensed under the AGPL 3.0 license. Website: https://github.com/element-hq/synapse 2024-07-24 16:51:23,537 - root - 365 - INFO - main - Server hostname: samcday.com 2024-07-24 16:51:23,537 - root - 366 - INFO - main - Instance name: master 2024-07-24 16:51:23,537 - root - 367 - INFO - main - Twisted reactor: EPollReactor 2024-07-24 16:51:23,537 - synapse.app.homeserver - 356 - INFO - main - Setting up server 2024-07-24 16:51:23,537 - synapse.server - 351 - INFO - main - Setting up. 2024-07-24 16:51:23,598 - synapse.storage.databases - 73 - INFO - main - [database config 'master']: Checking database server 2024-07-24 16:51:23,611 - synapse.storage.databases - 76 - INFO - main - [database config 'master']: Preparing for databases ['main', 'state'] 2024-07-24 16:51:23,612 - synapse.storage.prepare_database - 135 - INFO - main - ['main', 'state']: Checking existing schema version 2024-07-24 16:51:23,624 - synapse.storage.prepare_database - 139 - INFO - main - ['main', 'state']: Existing schema is 85 (+6 deltas) 2024-07-24 16:51:23,624 - synapse.storage.databases.main - 391 - INFO - main - Checking database for consistency with configuration... 2024-07-24 16:51:23,626 - synapse.storage.prepare_database - 433 - INFO - main - Applying schema deltas for v85 2024-07-24 16:51:23,631 - synapse.storage.prepare_database - 568 - INFO - main - Schema now up to date 2024-07-24 16:51:23,645 - synapse.storage.databases - 91 - INFO - main - [database config 'master']: Starting 'main' database -snip- 2024-07-24 16:51:23,930 - synapse.app._base - 220 - ERROR - main - Exception during startup Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 359, in setup hs.setup() File "/usr/local/lib/python3.11/site-packages/synapse/server.py", line 353, in setup self.datastores = Databases(self.DATASTORE_CLASS, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/__init__.py", line 100, in __init__ main = main_store_class(database, db_conn, hs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/__init__.py", line 170, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/events_bg_updates.py", line 107, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/experimental_features.py", line 44, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/devices.py", line 1772, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/devices.py", line 95, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/roommember.py", line 1504, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 2229, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 1772, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/room.py", line 146, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/registration.py", line 2327, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/profile.py", line 44, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/presence.py", line 80, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/presence.py", line 61, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/transactions.py", line 81, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 751, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 109, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/state.py", line 549, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/event_federation.py", line 2072, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/media_repository.py", line 199, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/media_repository.py", line 112, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/filtering.py", line 49, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/event_push_actions.py", line 1896, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/metrics.py", line 75, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/event_push_actions.py", line 263, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/end_to_end_keys.py", line 1449, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/e2e_room_keys.py", line 60, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/search.py", line 435, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/search.py", line 144, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/account_data.py", line 65, in __init__ super().__init__(database, db_conn, hs) File "/usr/local/lib/python3.11/site-packages/synapse/storage/databases/main/push_rule.py", line 143, in __init__ self._push_rules_stream_id_gen = MultiWriterIdGenerator( ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/synapse/storage/util/id_generators.py", line 295, in __init__ self._sequence_gen.check_consistency( File "/usr/local/lib/python3.11/site-packages/synapse/storage/util/sequence.py", line 192, in check_consistency raise IncorrectDatabaseSetup( synapse.storage.engines._base.IncorrectDatabaseSetup: Postgres sequence 'push_rules_stream_sequence' is inconsistent with associated stream position of 'push_rules_stream' in the 'stream_positions' table. This is likely a programming error and should be reported at https://github.com/matrix-org/synapse. A temporary workaround to fix this error is to shut down Synapse (including any and all workers) and run the following SQL: DELETE FROM stream_positions WHERE stream_name = 'push_rules_stream'; This will need to be done every time the server is restarted. ```
Description
I updated the package using apt, after which after a while I noticed high CPU consumption for Synapse processes, and then that messages were not actually sent to the recipients. Restarting the service didn't help. At the moment, rolling back to package version 1.108.0 helped.
Steps to reproduce
sudo apt update sudo apt upgrade
Homeserver
homeserver
Synapse Version
1.109.0rc1
Installation Method
Debian packages from packages.matrix.org
Database
PostgreSQL 16
Workers
I don't know
Platform
Configuration
No response
Relevant log output
Anything else that would be useful to know?
No response