forked from coop-cloud/nextcloud
See https://www.percona.com/blog/2016/05/16/mysql-got-an-error-reading-communication-packet-errors/. For ruangrupa infra.
51 lines
1.7 KiB
INI
51 lines
1.7 KiB
INI
# Mostly lifted from the following configs:
|
|
# https://git.coop/webarch/mariadb/-/blob/master/templates/50-server.cnf.j2
|
|
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/linux_database_configuration.html
|
|
# https://mariadb.com/kb/en/library/performance-schema-overview/
|
|
|
|
[server]
|
|
innodb_buffer_pool_size = 1G
|
|
innodb_flush_log_at_trx_commit = 2
|
|
innodb_log_buffer_size = 32M
|
|
innodb_max_dirty_pages_pct = 90
|
|
join_buffer_size = 256K
|
|
key_buffer_size = 16M
|
|
innodb_log_file_size = 256M
|
|
long_query_time = 1
|
|
max_allowed_packet = 256M
|
|
max_connections = 100
|
|
max_heap_table_size = 64M
|
|
max_user_connections = 0
|
|
myisam_recover_options = BACKUP
|
|
open_files_limit = 8000
|
|
query_cache_limit = 2M
|
|
query_cache_min_res_unit = 2k
|
|
query_cache_size = 64M
|
|
query_cache_type = 1
|
|
skip_name_resolve = 1
|
|
slow_query_log = 1
|
|
slow_query_log_file = /var/log/mysql/slow.log
|
|
table_cache = 64
|
|
table_open_cache = 2000
|
|
thread_cache_size = 8
|
|
thread_stack = 192K
|
|
tmp_table_size = 64M
|
|
|
|
[client]
|
|
default-character-set = utf8mb4
|
|
|
|
[mysqld]
|
|
character_set_server = utf8mb4
|
|
collation_server = utf8mb4_general_ci
|
|
transaction_isolation = READ-COMMITTED
|
|
binlog_format = ROW
|
|
innodb_large_prefix=on
|
|
innodb_file_per_table=1
|
|
|
|
[mariadb]
|
|
performance_schema=ON
|
|
performance-schema-instrument='stage/%=ON'
|
|
performance-schema-consumer-events-stages-current=ON
|
|
performance-schema-consumer-events-stages-history=ON
|
|
performance-schema-consumer-events-stages-history-long=ON
|