我们有一组PXC群集,每个群集都有我们用于读取的从属群集。奴隶正在使用"运行percona服务器5.7。 MAX_CONNECTIONS"和" max_user_connections"分别设置为4000和4050。但是每次我们重启我们的奴隶时,这些值都会自动重置为开箱即用的默认值,从而导致很多性能问题。这是一个错误,还是我们在配置中遗漏了什么?
以下是我们的配置文件(SSD):
#
# Default values.
[mysqld_safe]
flush_caches
numa_interleave
#
#
[mysqld]
back_log = 65535
binlog_format = ROW
character_set_server = utf8
collation_server = utf8_general_ci
#core_file
datadir = /var/lib/mysql
default_storage_engine = InnoDB
enforce-gtid-consistency = 1
expand_fast_index_creation = 1
expire_logs_days = 2
gtid_mode = ON
innodb_autoinc_lock_mode = 2
innodb_buffer_pool_instances = 64
innodb_buffer_pool_populate = 1
innodb_buffer_pool_size = 67G #77G
innodb_data_file_path = ibdata1:64M;ibdata2:64M:autoextend
innodb_file_format = Barracuda
innodb_file_per_table
#innodb_flush_log_at_trx_commit = 2
innodb_flush_log_at_trx_commit = 0
innodb_flush_method = O_DIRECT
innodb_io_capacity = 20000
innodb_large_prefix
innodb_locks_unsafe_for_binlog = 1
#innodb_log_file_size = 64M
innodb_log_file_size = 1G
innodb_print_all_deadlocks = 1
innodb_read_io_threads = 64
innodb_stats_on_metadata = FALSE
innodb_support_xa = FALSE
innodb_write_io_threads = 64
log-bin = mysqld-bin
#log-queries-not-using-indexes
log-slave-updates
long_query_time = 1
master_info_repository = TABLE
max_allowed_packet = 64M
max_connect_errors = 4294967295
max_connections = 4000
max_user_connections = 4050
min_examined_row_limit = 1000
port = 3306
read-only = 1
relay_log_info_repository = TABLE
relay-log-recovery = TRUE
skip-name-resolve
slave_parallel_workers = 8
slow_query_log = 1
slow_query_log_timestamp_always = 1
table_open_cache = 4096
thread_cache = 1024
tmpdir = /srv/tmp
transaction_isolation = REPEATABLE-READ
updatable_views_with_limit = 0
user = mysql
wait_timeout = 60
userstat
#innodb_buffer_pool_load_at_startup=1
#innodb_buffer_pool_dump_at_shutdown=1
#skip_slave_start
#
##for grafana dashboard monitoring
#query_response_time_stats = on
userstat = 1
server-id = 1019244
答案 0 :(得分:-1)
转到 /etc/my.cnf 并设置 最大连接数=1000 然后重启mysql