Skip to content

Commit 4a9f39d

Browse files
committed
Add wait and interactive timeout settings
The following new variables have been added: If not set in host_vars or group file, they are not applied, so we don't need to take care about the currently deployed VMs (they don't have both settings in config file, so it is not used) Sometimes the default (8h) values is not enough, for instance when storing a big AIP in AM
1 parent efe5537 commit 4a9f39d

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ mysql_innodb_log_file_size: "64M"
4646

4747
mysql_character_set_client_handshake: "FALSE"
4848

49+
# Optional timeout settings. Default 28800 (8h)
50+
#mysql_wait_timeout: "28800"
51+
#mysql_interactive_timeout: "28800"
52+
4953
mysql_timezone_info: "false"
5054

5155
mysql_databases: []

templates/etc_my.cnf-centos.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ table_open_cache = {{ mysql_table_cache }}
5959
thread_concurrency = {{ mysql_thread_concurrency }}
6060
{% endif %}
6161
sort_buffer_size = {{ mysql_sort_buffer_size }}
62+
{% if mysql_wait_timeout is defined %}
63+
wait_timeout = {{ mysql_wait_timeout }}
64+
{% endif %}
65+
{% if mysql_interactive_timeout is defined %}
66+
interactive_timeout = {{ mysql_interactive_timeout }}
67+
{% endif %}
6268

6369
# ** Query Cache Configuration, removed in MySQL >= 8.0
6470
{% if mysql_version_major|int < 8 %}

templates/etc_mysql_my.cnf.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ table_open_cache = {{ mysql_table_cache }}
5656
thread_concurrency = {{ mysql_thread_concurrency }}
5757
{% endif %}
5858
sort_buffer_size = {{ mysql_sort_buffer_size }}
59+
{% if mysql_wait_timeout is defined %}
60+
wait_timeout = {{ mysql_wait_timeout }}
61+
{% endif %}
62+
{% if mysql_interactive_timeout is defined %}
63+
interactive_timeout = {{ mysql_interactive_timeout }}
64+
{% endif %}
5965

6066
# ** Query Cache Configuration, removed in MySQL >= 8.0
6167
{% if mysql_version_major|int < 8 %}

0 commit comments

Comments
 (0)