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

systemctl reload matrix-synapse only reloads cache configuration #16071

Closed
monochromec opened this issue Aug 6, 2023 · 2 comments
Closed

systemctl reload matrix-synapse only reloads cache configuration #16071

monochromec opened this issue Aug 6, 2023 · 2 comments
Labels
A-Config Configuration, or the documentation thereof O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@monochromec
Copy link

Description

The Debian packaged version contains a systemd servide which sends a HUP to the server upon a reload request.

An initial RCA reveals that only the caching configuration is reloaded instead of the complete server configuration (version 1.88.0+bookworm1 running on Debian Bookworm installed from the repo (https://packages.matrix.org/debian): line 536 in synapse/app/_base.py .

Steps to reproduce

  • Install Synapse and configure the port in homeserver.yaml.
  • Start the service via systemd.
  • Change the port config.
  • Reload the service via systemd.
  • The server continues to run on the previously configured port.

Homeserver

Locally installed homeserver

Synapse Version

{"server_version":"1.88.0","python_version":"3.11.2"}

Installation Method

Debian packages from packages.matrix.org

Database

SQLite3

Workers

Single process

Platform

Debian Bookworm on a VPS.

Configuration

No response

Relevant log output

N/A

Anything else that would be useful to know?

Work-around: comment out the ExecReloadline in the service definition disabling the reload completely in order to force a restart instead of the reload.

@DMRobertson
Copy link
Contributor

An initial RCA reveals that only the caching configuration is reloaded

Synapse also reloads certificates

register_sighup(refresh_certificate, hs)

and logging config:

appbase.register_sighup(_reload_logging_config, log_config_path)

In general, Synapse was not designed back in 2014 (or earlier?) to have its config be dynamically reloaded; we have only added this ability very slowly. (c.f. #12673)

Related: #6550, #13351, #14338

@DMRobertson DMRobertson added A-Config Configuration, or the documentation thereof S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Aug 7, 2023
@clokep
Copy link
Member

clokep commented Aug 7, 2023

I'm going to close this -- we have issues open (see above) for specific features that feel would be extremely useful to reload during a SIGHUP. Realistically I think Synapse would need to re-architect some of its internals to be able to reload everything (and I can think of a few options which just can't be reloaded).

If there are other configuration settings which you would like to see included, please feel free to open other issues. Although I'll note that something like changing the port configuration is highly unlikely to be worked on by the core team (in particular changing any of the listeners config is likely to be a major faff not really worth the effort).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Config Configuration, or the documentation thereof O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

3 participants