-
Notifications
You must be signed in to change notification settings - Fork 236
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
Synapse takes 5 minutes to startup #17565
Comments
Hey, I'm not one of the maintainers but I'm leaving a comment here because I'm facing some similar issues and would like to know if you tested it after setting keepalives_* configuration in the Postgresql datasource. |
Hiya! I'm not tuning the connection keepalive settings at all: https://github.com/samcday/home-cluster/blob/cb2ecba/cluster/synapse/config/homeserver.yaml#L7-L13 FWIW, I think it's the query itself that is to blame, not the connection that carries that query. I tried to run it directly in |
I would be interested to know what |
Hm, yeah... right you are! I think maybe I was having deeper I/O issues with my DB, because that query is not taking an extremely long time any more:
I don't know if it's related (seems doubtful), but I did also purge out some big(-ish) rooms via the v2 room delete API yesterday, after I raised this issue. Anyway, my Postgres cluster is running on top of Ceph block storage, and I think there might have been some wobbliness there causing the weird I/O issues... That seems like a more likely culprit. I'll close this out now since it's an environmental issue and seems nothing to do with Synapse itself. Thanks ya'll! |
Thanks for following up! Sounds likely it was an environmental issue then. We do know that starting synapse can be pretty intensive for the DB, though generally we're talking about seconds for startup time rather than minutes. |
Description
My personal Synapse homeserver has started taking a very long time to startup. I switched on debug logging and discovered that it's issuing this SQL query that takes 5 minutes or so to execute:
Steps to reproduce
Start Synapse
Wait 5 minutes
Scratch head
Open this issue
Homeserver
https://homeserver.samcday.com/
Synapse Version
v1.112.0 + v1.113.0
Installation Method
Docker (matrixdotorg/synapse)
Database
Single PostgreSQL, not ported from SQLite, have not restored DB from backup
Workers
Single process
Platform
Fedora CoreOS 40
Kubernetes 1.30
containerd 1.6.23
Kernel 6.8.11-300.fc40.x86_64
Configuration
https://github.com/samcday/home-cluster/blob/cb2ecba/cluster/synapse/config/homeserver.yaml
Relevant log output
Anything else that would be useful to know?
No response
The text was updated successfully, but these errors were encountered: