Skip to content

Commit 9a7007f

Browse files
author
Fabio Buso
authored
[RONDB-845] Load Balancers are getting banned from MySQL servers (#44)
- Increase `max-connect-errors` to 9223372036854775807 - Parameterized `max-connections` and `max-prepared-stmt-count`
1 parent ab3957f commit 9a7007f

File tree

4 files changed

+39
-13
lines changed

4 files changed

+39
-13
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: rondb
55

66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
8-
version: 0.6.4
8+
version: 0.6.5
99

1010
# This is the version number of the application being deployed. This version number should be
1111
# incremented each time you make changes to the application.

files/configs/my.cnf

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
default-character-set = utf8mb4
33

44
[mysqld]
5-
basedir = /srv/hops/mysql
5+
basedir = /srv/hops/mysql
66
{{ if .forBinlogServers -}}
7-
datadir = {{ include "rondb.mysqld.binlogServers.dataDir" $ }}
7+
datadir = {{ include "rondb.mysqld.binlogServers.dataDir" $ }}
88
{{ else }}
9-
datadir = {{ include "rondb.mysqldDataDir" $ }}
9+
datadir = {{ include "rondb.mysqldDataDir" $ }}
1010
{{ end }}
11-
port = 3306
12-
socket = {{ include "rondb.dataDir" $ }}/mysql.sock
13-
bind-address = 0.0.0.0
14-
pid-file = {{ include "rondb.dataDir" $ }}/mysqld.pid
15-
tmpdir = /tmp
16-
max-connections = 512
17-
max-prepared-stmt-count = 65530
18-
log-error-verbosity = 3
11+
port = 3306
12+
socket = {{ include "rondb.dataDir" $ }}/mysql.sock
13+
bind-address = 0.0.0.0
14+
pid-file = {{ include "rondb.dataDir" $ }}/mysqld.pid
15+
tmpdir = /tmp
16+
max-connections = {{ .Values.mysql.config.maxConnections }}
17+
max-connect-errors = {{ .Values.mysql.config.maxConnectErrors }}
18+
max-prepared-stmt-count = {{ .Values.mysql.config.maxPreparedStmtCount }}
19+
log-error-verbosity = 3
1920

2021
# this allows us to run benchmarks
2122
local_infile = ON

values.schema.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,27 @@
837837
"additionalProperties": false
838838
},
839839
"description": "A list of MySQL users and their privileges."
840+
},
841+
"config": {
842+
"type": "object",
843+
"description": "MySQL configuration options",
844+
"properties": {
845+
"maxConnections": {
846+
"type": "integer",
847+
"description": "Maximum number of connections to the MySQL server.",
848+
"default": 512
849+
},
850+
"maxConnectErrors": {
851+
"type": "string",
852+
"description": "Maximum number of connection errors before the MySQL server blocks the host.",
853+
"default": "9223372036854775807"
854+
},
855+
"maxPreparedStmtCount": {
856+
"type": "integer",
857+
"description": "Maximum number of prepared statements.",
858+
"default": 65530
859+
}
860+
}
840861
}
841862
},
842863
"required": [

values.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright (c) 2024-2025 Hopsworks AB. All rights reserved.
2-
2+
#
33
# This file is auto-generated from the values.schema.json file.
44
# The file is also used to generate the GitHub Pages documentation.
55
# Schema JSON files allow defining restrictions, enums and references.
@@ -203,6 +203,10 @@ meta:
203203
name: mysqld-replica-appliers
204204
mysql:
205205
clusterUser: helm
206+
config:
207+
maxConnectErrors: '9223372036854775807'
208+
maxConnections: 512
209+
maxPreparedStmtCount: 65530
206210
credentialsSecretName: mysql-passwords
207211
exporter:
208212
enabled: false

0 commit comments

Comments
 (0)