在一个低配MySQL数据库(笔记本电脑虚机环境,虚机配置2CPU/3G内存),在3000万级别的大量数据LOAD DATA方式导入时,坚持一小时后,终于被KO了,甚至没写下任何有用的日志,只是在操作界面报错:ERROR 2013 (HY000): Lost connection to MySQL server during query
再次重启,漫长的半小时时间,遇见这个activating状态:
[root@node1:1 ~]# systemctl status mysql
● mysql.service - Percona XtraDB Cluster
Loaded: loaded (/usr/lib/systemd/system/mysql.service; disabled; vendor preset: disabled)
Active: activating (start-pre) since 五 2022-02-25 15:56:24 CST; 3min 49s ago
Process: 7626 ExecStopPost=/usr/bin/mysql-systemd stop-post (code=exited, status=3)
Process: 3748 ExecStartPost=/usr/bin/mysql-systemd start-post $MAINPID (code=exited, status=0/SUCCESS)
Process: 3746 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 3668 ExecStart=/usr/sbin/mysqld $_WSREP_START_POSITION (code=killed, signal=KILL)
Process: 8367 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 8325 ExecStartPre=/usr/bin/mysql-systemd start-pre (code=exited, status=0/SUCCESS)
Main PID: 3668 (code=killed, signal=KILL); : 8370 (sh)
Tasks: 34
CGroup: /system.slice/mysql.service
└─control
├─8370 /bin/sh -c VAR=`bash /usr/bin/mysql-systemd galera-recovery`; [ $? -eq 0 ] && systemctl set-e...
├─8372 /bin/sh -c VAR=`bash /usr/bin/mysql-systemd galera-recovery`; [ $? -eq 0 ] && systemctl set-e...
├─8373 bash /usr/bin/mysql-systemd galera-recovery
└─8422 /usr/sbin/mysqld --user=mysql --log-error-verbosity=3 --wsrep_recover --log_error=/mysql/pxc/...
此时在数据库日志没有任何有用的信息,时接近30分钟,才启动成功,可见MySQL在异常退出后在启动时,也会遭遇漫长的恢复过程。
此时数据库日志仍然显示之前的信息:
2022-02-25T07:01:33.501960Z 2 [Note] [MY-000000] [WSREP] wsrep_notify_cmd is not defined, skipping notification.
2022-02-25T07:44:19.824510Z 0 [Warning] [MY-000000] [Galera] last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT1.7712S), skipping check
2022-02-25T07:44:20.396508Z 0 [Warning] [MY-000000] [Galera] last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT2.86226S), skipping check
2022-02-25T07:44:29.978732Z 0 [Note] [MY-000000] [Galera] Created page /mysql/pxc/data/gcache.page.000000 of size 1787782200 bytes
2022-02-25T07:44:33.488631Z 0 [Warning] [MY-000000] [Galera] last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT1.92674S), skipping check
网搜了一下这个信息"evs.inactive_check_period",只是一个警告信息,可不予理会。
特记录于此,留待以后答疑。