Skip to content

Commit

Permalink
Add wait and interactive timeout settings
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mamedin committed Oct 7, 2024
1 parent efe5537 commit 4a9f39d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ mysql_innodb_log_file_size: "64M"

mysql_character_set_client_handshake: "FALSE"

# Optional timeout settings. Default 28800 (8h)
#mysql_wait_timeout: "28800"
#mysql_interactive_timeout: "28800"

mysql_timezone_info: "false"

mysql_databases: []
Expand Down
6 changes: 6 additions & 0 deletions templates/etc_my.cnf-centos.j2
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ table_open_cache = {{ mysql_table_cache }}
thread_concurrency = {{ mysql_thread_concurrency }}
{% endif %}
sort_buffer_size = {{ mysql_sort_buffer_size }}
{% if mysql_wait_timeout is defined %}
wait_timeout = {{ mysql_wait_timeout }}
{% endif %}
{% if mysql_interactive_timeout is defined %}
interactive_timeout = {{ mysql_interactive_timeout }}
{% endif %}

# ** Query Cache Configuration, removed in MySQL >= 8.0
{% if mysql_version_major|int < 8 %}
Expand Down
6 changes: 6 additions & 0 deletions templates/etc_mysql_my.cnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ table_open_cache = {{ mysql_table_cache }}
thread_concurrency = {{ mysql_thread_concurrency }}
{% endif %}
sort_buffer_size = {{ mysql_sort_buffer_size }}
{% if mysql_wait_timeout is defined %}
wait_timeout = {{ mysql_wait_timeout }}
{% endif %}
{% if mysql_interactive_timeout is defined %}
interactive_timeout = {{ mysql_interactive_timeout }}
{% endif %}

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

0 comments on commit 4a9f39d

Please sign in to comment.