Мой сбой базы данных с ошибкой нехватки памяти ~ 1-2 раза в день.Последний сбой был в 17:30 в журналах и в 19:30 в метриках (разных часовых поясах).
Ошибки в файле mariadb.log:
181120 16:09:00 [Warning] IP address '185.156.177.144' could not be resolved: Name or service not known
181120 16:35:40 [Warning] IP address '58.221.58.248' could not be resolved: Name or service not known
181120 17:30:38 mysqld_safe Number of processes running now: 0
181120 17:30:38 mysqld_safe mysqld restarted
181120 17:30:41 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
181120 17:30:41 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 16636 ...
181120 17:30:41 [Warning] Changed limits: max_open_files: 1024 max_connections: 70 table_cache: 472
181120 17:30:41 InnoDB: The InnoDB memory heap is disabled
181120 17:30:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181120 17:30:41 InnoDB: Compressed tables use zlib 1.2.7
181120 17:30:41 InnoDB: Using Linux native AIO
181120 17:30:41 InnoDB: Initializing buffer pool, size = 150.0M
181120 17:30:42 InnoDB: Completed initialization of buffer pool
181120 17:30:42 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
181120 17:30:42 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
181120 17:30:46 InnoDB: Waiting for the background threads to start
181120 17:30:47 Percona XtraDB (http://www.percona.com) 5.5.49-MariaDB-38.0 started; log sequence number 18741266161
181120 17:30:47 [Note] Plugin 'FEEDBACK' is disabled.
181120 17:30:48 [Note] Server socket created on IP: '0.0.0.0'.
181120 17:30:49 [Note] Event Scheduler: Loaded 0 events
181120 17:30:49 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.52-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
181120 17:30:53 [ERROR] mysqld: Table './admin_wikis/wp_posts' is marked as crashed and should be repaired
181120 17:30:53 [Warning] Checking table: './admin_wikis/wp_posts'
181120 17:31:58 mysqld_safe Number of processes running now: 0
181120 17:31:58 mysqld_safe mysqld restarted
181120 17:32:01 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
181120 17:32:01 [Note] /usr/libexec/mysqld (mysqld 5.5.52-MariaDB) starting as process 16899 ...
181120 17:32:01 [Warning] Changed limits: max_open_files: 1024 max_connections: 70 table_cache: 472
181120 17:32:01 InnoDB: The InnoDB memory heap is disabled
181120 17:32:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181120 17:32:01 InnoDB: Compressed tables use zlib 1.2.7
181120 17:32:01 InnoDB: Using Linux native AIO
181120 17:32:01 InnoDB: Initializing buffer pool, size = 150.0M
InnoDB: mmap(161447936 bytes) failed; errno 12
181120 17:32:01 InnoDB: Completed initialization of buffer pool
181120 17:32:01 InnoDB: Fatal error: cannot allocate memory for the buffer pool
181120 17:32:01 [ERROR] Plugin 'InnoDB' init function returned error.
181120 17:32:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
181120 17:32:01 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
181120 17:32:01 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
181120 17:32:01 [ERROR] mysqld: Out of memory (Needed 72499200 bytes)
181120 17:32:01 [Note] Plugin 'FEEDBACK' is disabled.
181120 17:32:02 [ERROR] Unknown/unsupported storage engine: InnoDB
181120 17:32:02 [ERROR] Aborting
181120 17:32:02 [Note] /usr/libexec/mysqld: Shutdown complete
Нет ничего интересного в входе apacheэтот раз.Количество запросов на событие
$ sudo grep -r "GET \/" /etc/httpd/logs/domains/ | cut -d' ' -f4 | sed 's/\[//;s/\]//;s/\"//' | cut -d':' -f1-2 | sort | uniq -c
459 19/Nov/2018:03
426 19/Nov/2018:04
239 19/Nov/2018:05
350 19/Nov/2018:06
381 19/Nov/2018:07
415 19/Nov/2018:08
778 19/Nov/2018:09
500 19/Nov/2018:10
450 19/Nov/2018:11
633 19/Nov/2018:12
458 19/Nov/2018:13
527 19/Nov/2018:14
713 19/Nov/2018:15
654 19/Nov/2018:16
573 19/Nov/2018:17
413 19/Nov/2018:18
471 19/Nov/2018:19
499 19/Nov/2018:20
661 19/Nov/2018:21
452 19/Nov/2018:22
773 19/Nov/2018:23
934 20/Nov/2018:00
295 20/Nov/2018:01
369 20/Nov/2018:02
441 20/Nov/2018:03
384 20/Nov/2018:04
927 20/Nov/2018:05
524 20/Nov/2018:06
972 20/Nov/2018:07
612 20/Nov/2018:08
609 20/Nov/2018:09
677 20/Nov/2018:10
753 20/Nov/2018:11
615 20/Nov/2018:12
717 20/Nov/2018:13
474 20/Nov/2018:14
973 20/Nov/2018:15
510 20/Nov/2018:16
534 20/Nov/2018:17
415 20/Nov/2018:18
90 20/Nov/2018:19
Я получаю некоторые метрики:
Процессы до сбоя:
Процессы в момент сбоя:
Использование памяти и процессора:
Общий объем оперативной памяти 3,6 ГБ.У кого-нибудь есть идеи?