Browse Source

Increase default connect timeout for mariadb

The mariadb cookbook imposes a default connect_timeout of 5 seconds.
This is too aggressive for services to initialize, and they error as a
result. To avoid such problems, mariadb should allow for a higher
threshold before timing out a connecting service. This change raises
that timeout to 30 seconds to be more graceful for services warming up.

Change-Id: I70775929dc49ed8c00a23bc7e354ebf9e9feb7f0
Samuel Cassiba 10 months ago
parent
commit
2fd2b86adb
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      recipes/mariadb-server.rb

+ 3
- 0
recipes/mariadb-server.rb View File

@@ -35,6 +35,9 @@ node.normal['mariadb']['allow_root_pass_change'] = true
35 35
 node.normal['mariadb']['server_root_password'] = super_password
36 36
 node.normal['mariadb']['mysqld']['bind_address'] = listen_address
37 37
 
38
+# increase the default from 5 seconds to allow extra time for services to warm up
39
+node.normal['mariadb']['connect_timeout'] = 30
40
+
38 41
 unless listen_address == '127.0.0.1' || listen_address == 'localhost'
39 42
   node.normal['mariadb']['forbid_remote_root'] = false
40 43
 end

Loading…
Cancel
Save