我在Ubuntu的服务器上运行一个Drupal实例。 但是,似乎mysql服务器往往会定期崩溃。
我提取的日志是这样的:
131221 4:22:54 [Note] /usr/sbin/mysqld: Shutdown complete 131221 4:22:55 [Note] Plugin 'FEDERATED' is disabled. 131221 4:22:55 InnoDB: The InnoDB memory heap is disabled 131221 4:22:55 InnoDB: Mutexes and rw_locks use GCC atomic builtins 131221 4:22:55 InnoDB: Compressed tables use zlib 1.2.3.4 131221 4:22:55 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 131221 4:22:55 InnoDB: Completed initialization of buffer pool 131221 4:22:55 InnoDB: Fatal error: cannot allocate memory for the buffer pool 131221 4:22:55 [ERROR] Plugin 'InnoDB' init function returned error. 131221 4:22:55 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 131221 4:22:55 [ERROR] Unknown/unsupported storage engine: InnoDB 131221 4:22:55 [ERROR] Aborting 131221 4:22:55 [Note] /usr/sbin/mysqld: Shutdown complete 131223 8:22:00 [Note] Plugin 'FEDERATED' is disabled. 131223 8:22:00 InnoDB: The InnoDB memory heap is disabled 131223 8:22:00 InnoDB: Mutexes and rw_locks use GCC atomic builtins 131223 8:22:00 InnoDB: Compressed tables use zlib 1.2.3.4 131223 8:22:00 InnoDB: Initializing buffer pool, size = 128.0M 131223 8:22:00 InnoDB: Completed initialization of buffer pool 131223 8:22:00 InnoDB: highest supported file format is Barracuda. InnoDB: Log scan progressed past the checkpoint lsn 4844461078 131223 8:22:00 InnoDB: Database was not shut down normally!
你有什么build议可以解决这个问题吗? 我试图在my.cnf中使用不同的数字,但我没有运气。
它看起来像你的系统没有足够的备用内存的innodb缓冲池。 你可以尝试在my.cnf文件中减小innodb_buffer_pool的大小
innodb_buffer_pool_size = 10M
例如,然后重新启动mysql。 减lessinnodb缓冲池大小可能会影响系统的性能,因此您需要了解这一点,或者考虑其他一些调整。