-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Logging in a new device hangs the client and eventually crashes the server #12071
Comments
Doing an initial Do you have the same problem if you downgrade to v1.52.0? Otherwise if you could enable debug logs and send a copy over to
which will list the current ongoing transactions/queries ordered oldest first. My best guess at this point is that there is an SQL query that is doing a large table scan, perhaps because the query planner has out dated statistics? You could try running |
Downgrading to v1.52.0 doesn't seem to help. It's easy to reproduce the issue - I just have to try to log in - but I don't want to let it run for too long as it kind of kills my server after some indeterminate point. Running that SQL query while the issue was occurring gives the following:
I checked a couple times over a period of a few minutes and that query seems to be continuing to run for at least that long. I'll look into getting the debug logs. Also, I ran |
|
Right, #11779 sounds like it's biting you. Did you recently restore a database backup and potentially restore it multiple times? |
About a year ago I changed server hardware and moved the database from the old hardware using pg_dump and pg_restore. I have no idea about whether I did it multiple times. |
After looking through some of the linked issues, it sounds like I just needed to de-duplicate the state_group_edges table.
|
Description
Logging a new device into my homeserver is hanging indefinitely and eventually running the server out of memory.
Homeserver info: 5 users, 250 MB total DB size, and almost no federation (just with two other small homeservers).
Upon login of my new device (tried with both Element for Android and Element web, and both hit the same issue), the device hangs on the "initial sync" while the server has a postgresql process start running at 100% of 1 cpu core and continues until the system runs out of memory (postgres was using 13GB last time it crashed). I've also seen the database go from 250MB to ~60GB while this is occurring, but it returns to the previous size after restarting it.
I have 3 other already-logged-in devices which are all working fine, I just can't seem to add any new ones.
Steps to reproduce
Normally login completes almost immediately and there's no noticeable wait for an "initial sync", and of course the server doesn't usually crash.
Logs from while the issue was occurring (I killed the DB/synapse at the end of these logs to avoid causing server issues):
Version information
If not matrix.org:
Version: 1.53.0
Install method: Running in container
The text was updated successfully, but these errors were encountered: