From dde19945c606dd096a2e79262e74eadfce4f0d34 Mon Sep 17 00:00:00 2001 From: Logan V Date: Wed, 19 Sep 2018 11:53:51 -0500 Subject: [PATCH] Allow configuration of startup timeout SST transfers of large databases can easily take longer than 30 minutes, causing the mysql process to restart over and over and never complete its sync to rejoin the cluster. Change-Id: I7654820f91fbb036ab4d4a6234c0ccec148a503a --- defaults/main.yml | 3 +++ templates/mysql_defaults.j2 | 2 +- templates/systemd.timeout.conf.j2 | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e3adb2f7..2a4f325c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -83,6 +83,9 @@ galera_tmp_table_size: 32M galera_file_limits: 65535 galera_wait_timeout: 3600 +# Increase this value if large SST transfers cause mysql startup to fail due +# to timeout +galera_startup_timeout: 1800 ## innodb options galera_innodb_buffer_pool_size: 4096M diff --git a/templates/mysql_defaults.j2 b/templates/mysql_defaults.j2 index b399e216..4c056e0b 100644 --- a/templates/mysql_defaults.j2 +++ b/templates/mysql_defaults.j2 @@ -10,7 +10,7 @@ # How long to wait for successful mysql startup # Startup can take a while if it requires a galera state transfer. -MYSQLD_STARTUP_TIMEOUT=1800 +MYSQLD_STARTUP_TIMEOUT={{ galera_startup_timeout }} ulimit -n {{ calculated_max_connections }} ulimit -Hn {{ calculated_max_connections }} diff --git a/templates/systemd.timeout.conf.j2 b/templates/systemd.timeout.conf.j2 index 74b9b1bd..5808c61c 100644 --- a/templates/systemd.timeout.conf.j2 +++ b/templates/systemd.timeout.conf.j2 @@ -3,4 +3,4 @@ [Service] # How long to wait for successful mysql startup # Startup can take a while if it requires a galera state transfer. -TimeoutStartSec=1800 +TimeoutStartSec={{ galera_startup_timeout }}