一小时前,我注意到 mysql(mariadb 5.2.5)服务器没有在我的 debian VPS 上运行。所以我立即运行了“/etc/init.d/mysql restart”,它启动得很好。以下是 mariadb 崩溃时守护进程日志的内容
Apr 23 11:58:15 slides mysqld_safe: Number of processes running now: 0
Apr 23 11:58:15 slides mysqld_safe: mysqld restarted
Apr 23 11:58:21 slides mysqld: 110423 11:58:21 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
Apr 23 11:58:21 slides mysqld: 110423 11:58:21 [Warning] '--default-collation' is deprecated and will be removed in a future release. Please use '--collation-server' instead.
Apr 23 11:58:26 slides mysqld: 110423 11:58:26 [ERROR] mysqld: Out of memory (Needed 131006464 bytes)
Apr 23 11:58:26 slides mysqld: 110423 11:58:26 [ERROR] mysqld: Out of memory (Needed 98254848 bytes)
Apr 23 11:58:27 slides mysqld: 110423 11:58:27 [Note] PrimeBase XT (PBXT) Engine 1.0.11-7 Pre-GA loaded...
Apr 23 11:58:27 slides mysqld: 110423 11:58:27 [Note] Paul McCullagh, PrimeBase Technologies GmbH, http://www.primebase.org
Apr 23 11:58:28 slides mysqld: 110423 11:58:28 [Note] The server was not shutdown correctly, recovery required
Apr 23 11:58:29 slides mysqld: InnoDB: The InnoDB memory heap is disabled
Apr 23 11:58:29 slides mysqld: InnoDB: Mutexes and rw_locks use GCC atomic builtins
Apr 23 11:58:29 slides mysqld: InnoDB: Compressed tables use zlib 1.2.3.4
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 InnoDB: Initializing buffer pool, size = 256.0M
Apr 23 11:58:29 slides mysqld: InnoDB: mmap(272171008 bytes) failed; errno 12
Apr 23 11:58:29 slides mysqld: 110423 11:58:29InnoDB: Fatal error: cannot allocate the memory for the buffer pool
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 [ERROR] Plugin 'InnoDB' init function returned error.
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 [ERROR] Unknown/unsupported table type: InnoDB
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 [ERROR] Aborting
Apr 23 11:58:29 slides mysqld:
Apr 23 11:58:29 slides mysqld: 110423 11:58:29 [Note] PrimeBase XT Engine shutdown...
Apr 23 11:58:30 slides mysqld: 110423 11:58:30 [Note] /usr/sbin/mysqld: Shutdown complete
Apr 23 11:58:30 slides mysqld:
Apr 23 11:58:31 slides mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
我只需要绝对确定我理解这里发生的一切。mysqld_safe 看到 mysql 没有运行并尝试重新启动它,对吗?但是内存有问题?
这一行是什么意思?InnoDB: Initializing buffer pool, size = 256.0M
它试图分配 256MB 还是只是告知大小?我也没有积极使用 InnoDB。
答案1
确保检查服务器的可用内存量。