MySQL 有时会在半夜自行关闭。以下是日志

MySQL 有时会在半夜自行关闭。以下是日志

我的 MySQL 服务有时会在凌晨 2 点左右自行关闭。我找不到此日志文件的哪一部分解释了原因。

我把它托管在 DigitalOcean 上。我不确定是不是因为他们有备份和快照功能。

请指教。

150812  2:27:48 [Note] Plugin 'FEDERATED' is disabled.
150812  2:27:48 InnoDB: The InnoDB memory heap is disabled
150812  2:27:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150812  2:27:48 InnoDB: Compressed tables use zlib 1.2.8
150812  2:27:48 InnoDB: Using Linux native AIO
150812  2:27:48 InnoDB: Initializing buffer pool, size = 256.0M
InnoDB: mmap(274726912 bytes) failed; errno 12
150812  2:27:48 InnoDB: Completed initialization of buffer pool
150812  2:27:48 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150812  2:27:48 [ERROR] Plugin 'InnoDB' init function returned error.
150812  2:27:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150812  2:27:48 [ERROR] Unknown/unsupported storage engine: InnoDB
150812  2:27:48 [ERROR] Aborting

150812  2:27:48 [Note] /usr/sbin/mysqld: Shutdown complete

150812  2:27:49 [Note] Plugin 'FEDERATED' is disabled.
150812  2:27:49 InnoDB: The InnoDB memory heap is disabled
150812  2:27:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150812  2:27:49 InnoDB: Compressed tables use zlib 1.2.8
150812  2:27:49 InnoDB: Using Linux native AIO
150812  2:27:49 InnoDB: Initializing buffer pool, size = 256.0M
InnoDB: mmap(274726912 bytes) failed; errno 12
150812  2:27:49 InnoDB: Completed initialization of buffer pool
150812  2:27:49 InnoDB: Fatal error: cannot allocate memory for the buffer pool
150812  2:27:49 [ERROR] Plugin 'InnoDB' init function returned error.
150812  2:27:49 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150812  2:27:50 [ERROR] Unknown/unsupported storage engine: InnoDB
150812  2:27:50 [ERROR] Aborting

答案1

“致命错误”通常是一个很好的迹象,“致命错误:无法为缓冲池分配内存”,但这似乎是启动消息,而不是关闭消息。事实上,该日志中没有任何内容表明服务器已运行一段时间然后关闭。鉴于您说服务器在午夜关闭,您可能希望查看该时间左右的日志,而不是 2:27 的日志。

相关内容