-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[sqlite] Upgrade to 1.68 leads to bootlooping Synapse systemd service #14100
Comments
This is a repeat of #13193 |
As a workaround, you could try running the command described in #13193 (comment) before trying to start the server: sudo update_synapse_database --database-config /etc/synapse/homeserver.yaml |
I don't think we should consider this closed. We can do more to help people here (docs? Increase the timeout?) |
Does systemd send us a signal in this situation? Could we catch it and log a warning "maybe migrations are too slow, try |
Aha. From
Can't see that set in https://github.com/matrix-org/synapse/blob/47db2c3673290ca1e0dff3bd4fb9f461c97c67c3/contrib/systemd/matrix-synapse.service, so we must get a SIGTERM. |
Yes, we'll get a SIGTERM in this case. We could probably add a check in our SIGTERM handler (aka |
Description
After upgrading Debian packages for
matrix-synapse-py3
(from 1.61.1 to 1.68.0 in this case), Synapse fails to run.Upon further inspection, it appears that on startup Synapse tries to run a database schema update but doesn't finish and then restarts or gets restarted:
Synapse gets killed before being able to finish the db migration.
Steps to reproduce
apt upgrade
restarting the matrix-synapse service makes no difference and leads to the same result
Solution
The fix is very simple, tanks to @reivilibre for suggesting it: systemd kills the matrix-synapse service unit for taking too long to report it has started ok (a combination of
Type=notify
and long execution time for that task).Simply
systemctl edit matrix-synapse.service
and add the following override to increase the timeout and give enough time for the database upgrade to finish:Homeserver
personal homeserver
Synapse Version
1.68.0
Installation Method
Debian packages from packages.matrix.org
Platform
Debian 11.5
Relevant log output
Anything else that would be useful to know?
See Solution above
The text was updated successfully, but these errors were encountered: