MariaDB автоматически отключается каждые 30 минут

Сервис MariaDB автоматически отключается через 30 минут.

Это VPS, 12 vCPU, 12 ГБ оперативной памяти. CentOS 7, Webmin, Virtualmin, 5.5.60-MariaDB, PHP 7.2, Apache 2.

В журнале ошибок нет, загрузка процессора в среднем 10%.

Я создал скрипт bash, который проверяет и перезапускает его, если он выключен, но это создает около минуты простоя для занятого сайта.

Любые предложения и идеи приветствуются!

Version: '5.5.60-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server 
181215 10:11:46 [Note] /usr/libexec/mysqld: Normal shutdown 
181215 10:11:46 [Note] Event Scheduler: Purging the queue. 0 events 
181215 10:11:46  InnoDB: Starting shutdown... 
181215 10:11:51  InnoDB: Shutdown completed; log sequence number 62284182262 
181215 10:11:51 [Note] /usr/libexec/mysqld: Shutdown complete

181215 10:11:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
181215 10:11:52 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release. 
181215 10:11:52 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 3233 ... 
181215 10:11:52 [Warning] Could not increase number of max_open_files to more than 1024 (request: 2035) 
181215 10:11:52 InnoDB: The InnoDB memory heap is disabled 
181215 10:11:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins 181215 10:11:52 InnoDB: Compressed tables use zlib 1.2.7 
181215 10:11:52 InnoDB: Using Linux native AIO 181215 10:11:52 InnoDB: Initializing buffer pool, size =
128.0M 
181215 10:11:52 InnoDB: Completed initialization of buffer pool 
181215 10:11:52 InnoDB: highest supported file format is Barracuda. 
181215 10:11:52  InnoDB: Waiting for the background threads to start 
181215 10:11:53 Percona XtraDB (http://www.percona.com)
5.5.59-MariaDB-38.11 started; log sequence number 62284182262 
181215 10:11:53 [Note] Plugin 'FEEDBACK' is disabled. 
181215 10:11:53 [Note] Server socket created on IP: '0.0.0.0'. 
181215 10:11:53 [Note] Event Scheduler: Loaded 0 events 
181215 10:11:53 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.5.60-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server 181215 10:42:51 [Note] /usr/libexec/mysqld: Normal shutdown 
181215 10:42:51 [Note] Event Scheduler: Purging the queue. 0 events 
181215 10:42:51  InnoDB: Starting shutdown... 
181215 10:42:53  InnoDB: Shutdown completed; log sequence number 62285727771 
181215 10:42:53 [Note] /usr/libexec/mysqld: Shutdown complete

181215 10:42:55 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 
181215 10:42:55 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release. 
181215 10:42:55 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 21213 ... 
181215 10:42:55 [Warning] Could not increase number of max_open_files to more than 1024 (request: 2035) 
181215 10:42:55 InnoDB: The InnoDB memory heap is disabled 
181215 10:42:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
181215 10:42:55 InnoDB: Compressed tables use zlib 1.2.7 181215 10:42:55 InnoDB: Using Linux native AIO 181215 10:42:55 InnoDB: Initializing buffer pool, size =
128.0M 
181215 10:42:55 InnoDB: Completed initialization of buffer pool 
181215 10:42:55 InnoDB: highest supported file format is Barracuda. 
181215 10:42:55  InnoDB: Waiting for the background threads to start 
181215 10:42:56 Percona XtraDB (http://www.percona.com)
5.5.59-MariaDB-38.11 started; log sequence number 62285727771 
181215 10:42:56 [Note] Plugin 'FEEDBACK' is disabled. 
181215 10:42:56 [Note] Server socket created on IP: '0.0.0.0'. 
181215 10:42:56 [Note] Event Scheduler: Loaded 0 events 181215 10:42:56 [Note] /usr/libexec/mysqld: ready for connections.

/etc/my.cnf content:

[mysqld]
open_files_limit=1024000 
open-files-limit = 1024000 
datadir=/var/lib/mysql 
socket=/var/lib/mysql/mysql.sock 
innodb_buffer_pool_size=64M 
symbolic-links=0 
innodb_file_per_table = 1 
thread_concurrency = 8 
query_cache_size = 32M 
thread_cache_size = 8 
myisam_sort_buffer_size = 64M 
read_rnd_buffer_size = 8M 
read_buffer_size = 2M 
sort_buffer_size = 2M 
table_open_cache = 512 
max_allowed_packet=256M 
key_buffer_size = 384M 
big-tables 
default-storage-engine = MyISAM 
tmp_table_size=256M 
max_heap_table_size=512M 
local-infile=0 
max_connections=100 
wait_timeout=60


[mysqld_safe] 
log-error=/var/log/mariadb/mariadb.log 
pid-file=/var/run/mariadb/mariadb.pid 
open_files_limit = 102400 
open-files-limit = 102400 
socket=/var/lib/mysql/mysql.sock 
innodb_buffer_pool_size=64M

!includedir /etc/my.cnf.d

1 ответ

Не видя вашу систему и / или пользователя crontab файлы или любые журналы запросов, и учитывая, что завершение работы не происходит почти точно через 31 минуту после запуска (и не точно в минуту или близко к ней, например 10:42:00, как это было бы из cron или же at), Я думаю, что запрос выдается либо локально на сервере, либо удаленно с клиента или приложения.

Роберт Барабас из Percona написал отличный диагностический пост о поиске того, что может случайно отключить демон MySQL; после этого и увеличение громкости в журналах запросов должно помочь вам найти виновника.

Другие вопросы по тегам