【发布时间】:2023-01-22 14:46:31
【问题描述】:
我有一个数字海洋VPS,今天mysql服务意外停止,错误是
2022-09-06 14:20:02 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2022-09-06 14:20:02 0 [Note] Event Scheduler: Purging the queue. 0 events
2022-09-06 14:20:02 0 [Note] InnoDB: FTS optimize thread exiting.
2022-09-06 14:20:02 0 [Note] InnoDB: Starting shutdown...
2022-09-06 14:20:02 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2022-09-06 14:20:02 0 [Note] InnoDB: Buffer pool(s) dump completed at 220906 14:20:02
2022-09-06 14:20:04 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2022-09-06 14:20:04 0 [Note] InnoDB: Shutdown completed; log sequence number 292509498; transaction id 183124
2022-09-06 14:20:04 0 [Note] /usr/sbin/mysqld: Shutdown complete
2022-09-06 14:20:04 0 [Note] InnoDB: Using Linux native AIO
2022-09-06 14:20:04 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-09-06 14:20:04 0 [Note] InnoDB: Uses event mutexes
2022-09-06 14:20:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-09-06 14:20:04 0 [Note] InnoDB: Number of pools: 1
2022-09-06 14:20:04 0 [Note] InnoDB: Using SSE2 crc32 instructions
2022-09-06 14:20:04 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2022-09-06 14:20:04 0 [Note] InnoDB: Completed initialization of buffer pool
2022-09-06 14:20:04 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2022-09-06 14:20:04 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2022-09-06 14:20:04 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2022-09-06 14:20:04 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2022-09-06 14:20:04 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2022-09-06 14:20:04 0 [Note] InnoDB: Waiting for purge to start
2022-09-06 14:20:04 0 [Note] InnoDB: 10.3.34 started; log sequence number 292509498; transaction id 183125
2022-09-06 14:20:04 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-09-06 14:20:04 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2022-09-06 14:20:04 0 [Note] Server socket created on IP: '::'.
2022-09-06 14:20:04 0 [Note] Reading of all Master_info entries succeeded
2022-09-06 14:20:04 0 [Note] Added new Master_info '' to hash table
2022-09-06 14:20:04 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.34-MariaDB-0ubuntu0.20.04.1' socket: '/run/mysqld/mysqld.sock' port: 3306 Ubuntu 20.04
2022-09-06 14:20:04 0 [Note] InnoDB: Buffer pool(s) load completed at 220906 14:20:04
对此有何解释?我只想知道是否有解决方法。
【问题讨论】:
-
那里没有错误信息。这些只是正常的启动消息。
-
第一行说这是正常关机。不是崩溃或错误,也没有被 OOM 杀手杀死。听起来像是某人或某物发出了调用干净关机的命令,例如
service restart mysql或类似的东西。 -
是的,我有一个脚本,每次 cpu 达到 100% 的使用率时都会重新启动 mysql 服务,所以这可能就是答案,所以我现在知道我应该将研究的目标放在哪里。谢谢!
-
听起来很有可能。常见的原因是 logrotate 脚本编写不当。根据您要解决的具体问题,可能有更好的 100% 重启解决方案。建议询问DBA stack exchange。
标签: ubuntu mariadb mariadb-10.3