Mysql Maria упала и разбилась. Куда смотреть, что делать, чтобы не повторилось?

Фанат

oncle terrible
Команда форума
Судя по всему сегодня где-то в час ночи случилось что-то ужасное.
Во всяком случае бд перестала отвечать
Я проснулся в 8 и начал совершать хаотичные телодвижения, в частности перезапускать сервис. Стало писать такое
Mar 05 05:08:35 phpfaq.ru systemd[1]: Starting MariaDB 10.3 database server...
Mar 05 05:08:35 phpfaq.ru mysql-check-socket[8101]: Socket file /var/lib/mysql/mysql.sock exists.
Mar 05 05:08:35 phpfaq.ru mysql-check-socket[8101]: No process is using /var/lib/mysql/mysql.sock, which means it is a garbage, so it will be removed automatically.
Mar 05 05:08:35 phpfaq.ru mysql-prepare-db-dir[8129]: Database MariaDB is probably initialized in /var/lib/mysql already, nothing is done.
Mar 05 05:08:35 phpfaq.ru mysql-prepare-db-dir[8129]: If this is not the case, make sure the /var/lib/mysql is empty before running mysql-prepare-db-dir.
Mar 05 05:08:35 phpfaq.ru systemd[1]: mariadb.service: Found left-over process 32610 (mysqld) in control group while starting unit. Ignoring.
Mar 05 05:08:35 phpfaq.ru systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Mar 05 05:08:35 phpfaq.ru mysqld[8166]: 2020-03-05 5:08:35 0 [Note] /usr/libexec/mysqld (mysqld 10.3.11-MariaDB) starting as process 8166 ...
Mar 05 05:08:35 phpfaq.ru mysqld[8166]: 2020-03-05 5:08:35 0 [Warning] Could not increase number of max_open_files to more than 1024 (request: 4183)
Mar 05 05:08:35 phpfaq.ru mysqld[8166]: 2020-03-05 5:08:35 0 [Warning] Changed limits: max_open_files: 1024 max_connections: 151 (was 151) table_cache: 421 (was 2000)

Процесс долго не давал заребутить сервер, потом я уж ногой его через линоду переагрузил
Ниже содержимое mariadb.log
Мне бы просто начальную точку - куда бежать

2020-03-05 5:08:35 0 [Note] InnoDB: Starting shutdown...
double free or corruption (out)
200305 5:08:35 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.11-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467389 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x49000
 

grigori

( ͡° ͜ʖ ͡°)
Команда форума
у тебя много таблиц? запросы через временные таблицы или disk sort?
 

fixxxer

К.О.
Партнер клуба
Посмотри в логах, что там было на тот момент, когда база перестала отвечать.
Помимо мыскля, еще и системные логи надо посмотреть (journalctl).
 

AnrDaemon

Продвинутый новичок
Старый прикол.
Добавить в юнит

LimitNOFILE=32000
LimitNPROC=32000
 

Yoskaldyr

"Спамер"
Партнер клуба
@AnrDaemon если веселая OVZ виртуалка, то может не помочь
Кстати как раз из-за таких нежданчиков всегда предпочитаю KVM/XEN/Hyper-V, а не OVZ
 

grigori

( ͡° ͜ʖ ͡°)
Команда форума
на линоде никогда не было ovz, они с xen перешли на kvm
 
Сверху