Добрый день, достался по наследству сервер с битрикс. После переноса на другой сервер - выяснилось что mysql раз в день сьедает все 32ГБ памяти, свап и падает. После перезагрузки ситуация повторяется.
Полез смотреть в настройки mysql - но тут я профан. На мой взгляд в настройках сумбур, и явно что то не верно.
Что поправить чтобы память не улетала в небеса?
my.cnf
spoiler
#
# Basic mysql configuration. Use bvat for advanced settings.
# Parameters set by bvat are stored in /etc/mysql/conf.d/bvat.cnf.
# If you want to change any parameter, you'll have to redefine it in /etc/mysql/conf.d/z_bx_custom.cnf
#
[client]
port = 3306
socket = /var/lib/mysqld/mysqld.sock
default-character-set = utf8
[mysqld_safe]
nice = 0
socket = /var/lib/mysqld/mysqld.sock
[mysqld]
# Basic mysql server configuration
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
socket = /var/lib/mysqld/mysqld.sock
skip-external-locking
default-storage-engine = innodb
pid-file = /var/run/mysqld/mysqld.pid
transaction-isolation = READ-COMMITTED
max_allowed_packet = 16M
myisam-recover-options = BACKUP
explicit_defaults_for_timestamp = 1
expire_logs_days = 10
max_binlog_size = 100M
sql_mode = ""
# Cache parameters
query_cache_size = 32M
table_open_cache = 4096
thread_cache_size = 32
key_buffer_size = 16M
thread_stack = 128K
join_buffer_size = 2M
sort_buffer_size = 2M
# Parameters for temporary tables
tmpdir = /tmp
max_heap_table_size = 32M
tmp_table_size = 32M
# InnoDB parameters
innodb_file_per_table
innodb_buffer_pool_size = 32M
innodb_flush_log_at_trx_commit = 2
innodb_log_file_size = 64M
innodb_flush_method = O_DIRECT
# Database charset parameters
character-set-server = utf8
collation-server = utf8_unicode_ci
init-connect = "SET NAMES utf8 COLLATE utf8_unicode_ci"
#skip-character-set-client-handshake
skip-name-resolve
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
default-character-set = utf8
[mysql]
[isamchk]
key_buffer = 16M
# Include additional settings
!includedir /etc/mysql/conf.d/
vbat
spoiler# memory: 32768MB
[mysqld]
query_cache_type = 1
query_cache_size = 128M
query_cache_limit = 16M
innodb_buffer_pool_size = 14336M
max_connections = 125
table_open_cache = 14336
thread_cache_size = 128
max_heap_table_size = 128M
tmp_table_size = 128M
key_buffer_size = 196M
join_buffer_size = 24M
sort_buffer_size = 24M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 24M
bx_custom
spoiler[mysqld]
# memory: 8192MB
query_cache_type = 1
query_cache_size = 64M
query_cache_limit = 64M
innodb_buffer_pool_size = 10G
max_connections = 256
table_open_cache = 12288
thread_cache_size = 128
max_heap_table_size = 128M
tmp_table_size = 128M
key_buffer_size = 16M
join_buffer_size = 14M
sort_buffer_size = 14M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 14M