Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSS got completely stuck #3115

Closed
ara4n opened this issue Aug 5, 2024 · 7 comments
Closed

SSS got completely stuck #3115

ara4n opened this issue Aug 5, 2024 · 7 comments
Labels
A-SSS Regression or bug observed when using Simplified Sliding Sync O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@ara4n
Copy link
Member

ara4n commented Aug 5, 2024

Steps to reproduce

  1. opened app on slightly dodgy connectivity (1 bar of wifi)
  2. roomlist showed stale rooms from hours ago
  3. timelines within rooms showed stale history too
  4. waited a while to see if a spinner would turn up, or history would resync, despite moving onto good connectivity
  5. no spinner; no sync

Outcome

What did you expect?

There should be a spinner if you are staring at stale history wondering if it's stale or not.

Sync should not get stuck due to bad connectivity, but retry when connectivity recovers.

What happened instead?

Stuck sync, with zero UI feedback to tell you you're offline or looking at stale info.

Your phone model

No response

Operating system version

No response

Application version

669

Homeserver

No response

Will you send logs?

Yes

@erikjohnston
Copy link
Member

Ah, this happened because I restarted the server which blew away the in-memory cache of which rooms we'd sent down. This caused it to basically try and send down all your rooms again.

We need to migrate the per-connection state to the DB, but for now: element-hq/synapse#17529

@ara4n ara4n added the A-SSS Regression or bug observed when using Simplified Sliding Sync label Aug 5, 2024
erikjohnston added a commit to element-hq/synapse that referenced this issue Aug 6, 2024
This triggers the client to start a new sliding sync connection. If we
don't do this and the client asks for the full range of rooms, we end up
sending down all rooms and their state from scratch (which can be very
slow)

This causes things like
element-hq/element-x-ios#3115 after we restart
the server

---------

Co-authored-by: Eric Eastwood <[email protected]>
@erikjohnston
Copy link
Member

PR has landed and been deployed

@MadLittleMods
Copy link

I feel like this should be re-opened to address better UI feedback:

zero UI feedback to tell you you're offline or looking at stale info.


I also want to point out that if @erikjohnston's investigation is correct, /sync wasn't completely stuck, just slow because the client is asking for a full range of rooms, and without the cache to tell whether a room has been sent down the connection before, we end up sending down all rooms and their state from scratch (which can be very slow). With element-hq/synapse#17529, we expire the connection and allow the client a chance to do an initial request with a smaller range of rooms to get them some results sooner but will end up taking the same amount of time (more with round-trips and re-processing) in the end to get everything again.

@ara4n
Copy link
Member Author

ara4n commented Aug 19, 2024

so it may be a different cause, but i just got this again

@ara4n ara4n reopened this Aug 19, 2024
@Velin92 Velin92 added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Aug 19, 2024
@manuroe
Copy link
Member

manuroe commented Sep 3, 2024

@ara4n can you send a rageshake when it happens again?

@manuroe
Copy link
Member

manuroe commented Oct 1, 2024

@ara4n is it still an issue?
If yes, send a rageshake when you encounter the bug.

@manuroe
Copy link
Member

manuroe commented Oct 24, 2024

Given the super positive feedback we got in an internal room on the Oct, 23th. I am closing it.

@manuroe manuroe closed this as completed Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SSS Regression or bug observed when using Simplified Sliding Sync O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

5 participants