mysql 每天同一时间发生故障,并且发生许多请求时

mysql 每天同一时间发生故障,并且发生许多请求时

我的 mysql 数据库出现了一些问题。

我配置了一个带有数据库和其他服务(apache,php)的服务器并运行多个应用程序。

有两个问题。

第一个:每天同一时间mysql都会出现故障,我必须去重新启动它。

第二种:每次我不断重新加载网站多次,mysql就会崩溃,并且需要重新启动它。

140106  8:30:14 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use$
140106  8:30:14 [Note] Plugin 'FEDERATED' is disabled.
140106  8:30:14 InnoDB: The InnoDB memory heap is disabled
140106  8:30:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140106  8:30:14 InnoDB: Compressed tables use zlib 1.2.3.4
140106  8:30:14 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140106  8:30:14 InnoDB: Completed initialization of buffer pool
140106  8:30:14 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140106  8:30:14 [ERROR] Plugin 'InnoDB' init function returned error.
140106  8:30:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140106  8:30:14 [ERROR] Unknown/unsupported storage engine: InnoDB
140106  8:30:14 [ERROR] Aborting
140106  8:30:14 [Note] /usr/sbin/mysqld: Shutdown complete

我的数据库出了什么问题?

答案1

看起来 mysql 故障是因为 RAM 不足。可能是 cron 启动的某个应用程序占用了所有内存?这可以解释为什么故障会同时发生以及为什么 mysql 可以在一段时间内启动。

答案2

这看起来像是内存问题。要么增加更多 RAM,要么降低 innodb 缓冲池大小。

my.cnf 中的内容如下:

[mysqld]
innodb_buffer_pool_size = 64M

相关内容