Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Default sync_response_cache_duration can lead to clients never being able to initial sync #13027

Closed
turt2live opened this issue Jun 11, 2022 · 4 comments · Fixed by #13042
Closed
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@turt2live
Copy link
Member

Description

Large accounts or slow servers can mean that the client will retry /sync (without ?since) until it gets a result. However, the server's default cache time for sync responses seemingly went from some number of minutes to zero. This means that the server processes large /sync requests in the background but immediately throws away the result if the client gave up waiting and tried a second request.

There should be a non-zero default on the config value.

Steps to reproduce

  • Be in thousands of rooms
  • Have a slow-ish server
  • Try to sync your account

Homeserver

t2l.io & t2bot.io

Synapse Version

1.60.0

Installation Method

pip (from PyPI)

Platform

N/A

Relevant log output

N/A

Anything else that would be useful to know?

No response

@reivilibre
Copy link
Contributor

This is sounding similar to (maybe the cause of) #12971.

@erikjohnston
Copy link
Member

However, the server's default cache time for sync responses seemingly went from some number of minutes to zero.

I don't believe it has ever been non-zero ftr, at least I can't see any evidence of that in the code.

@erikjohnston erikjohnston added the T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. label Jun 14, 2022
@chagai95
Copy link
Contributor

This was bothering me for a good few months, so happy I found this, thx so much for reporting!

@turt2live
Copy link
Member Author

However, the server's default cache time for sync responses seemingly went from some number of minutes to zero.

I don't believe it has ever been non-zero ftr, at least I can't see any evidence of that in the code.

I have vague memory of it being 5 minutes, though that could have been a matrix.org hotfixes thing. Prior to the config setting it was easier to get a successful sync, at least.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants