Add systemd-healthcheck to Synapse systemd service in an effort to increase reliability (of Synapse-dependant services)
Previously, we had a 10-second magical delay. Now we first do a healthcheck to figure out when it really is up. Then, we do the same 10-second magical delay to account for the time it may take for a reverse-proxy (like Traefik) to pick up Synapse's routes.
This commit is contained in:
@@ -69,8 +69,12 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} network conne
|
||||
|
||||
ExecStart={{ devture_systemd_docker_base_host_command_docker }} start --attach matrix-synapse
|
||||
|
||||
{% if matrix_synapse_systemd_healthcheck_enabled %}
|
||||
ExecStartPost={{ matrix_synapse_systemd_healthcheck_command }}
|
||||
{% endif %}
|
||||
|
||||
{% if matrix_synapse_systemd_service_post_start_delay_seconds > 0 %}
|
||||
ExecStartPost=-{{ matrix_host_command_sleep }} {{ matrix_synapse_systemd_service_post_start_delay_seconds }}
|
||||
ExecStartPost=-{{ matrix_host_command_sleep }} {{ matrix_synapse_systemd_service_post_start_delay_seconds }}
|
||||
{% endif %}
|
||||
|
||||
ExecStop=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop -t {{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-synapse 2>/dev/null || true'
|
||||
|
||||
Reference in New Issue
Block a user