MariaDB 崩溃,现在无法启动

MariaDB 崩溃,现在无法启动

激活 wordpress 插件时 MariaDB 崩溃了,无法重新启动。我使用的是 Centos 7.1。

systemctl状态:

systemctl status mariadb.service
mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
   Active: failed (Result: exit-code) since Tue 2015-10-27 20:22:02 EDT; 2min 29s ago
  Process: 3587 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
  Process: 3586 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
  Process: 3559 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
 Main PID: 3586 (code=exited, status=0/SUCCESS)

Oct 27 20:22:01 s1.pavelow.net mysqld_safe[3586]: 151027 20:22:01 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Oct 27 20:22:01 s1.pavelow.net mysqld_safe[3586]: 151027 20:22:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Oct 27 20:22:01 s1.pavelow.net mysqld_safe[3586]: 151027 20:22:01 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
Oct 27 20:22:02 s1.pavelow.net systemd[1]: mariadb.service: control process exited, code=exited status=1
Oct 27 20:22:02 s1.pavelow.net systemd[1]: Failed to start MariaDB database server.
Oct 27 20:22:02 s1.pavelow.net systemd[1]: Unit mariadb.service entered failed state.

journalctl-xn

-- Logs begin at Tue 2015-10-27 20:05:31 EDT, end at Tue 2015-10-27 20:24:34 EDT. --
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): DHCPv4 state changed timeout -> done
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): Activation: Stage 4 of 5 (IPv4 Configure Timeout) scheduled...
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): Activation: Stage 4 of 5 (IPv4 Configure Timeout) started...
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): device state change: ip-config -> failed (reason 'ip-config-unavailable')
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  Disabling autoconnect for connection 'Wired connection 1'.
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <warn>  (eth1): Activation: failed for connection 'Wired connection 1'
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): Activation: Stage 4 of 5 (IPv4 Configure Timeout) complete.
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): device state change: failed -> disconnected (reason 'none') [120 30 0]
Oct 27 20:24:34 s1.pavelow.net NetworkManager[533]: <info>  (eth1): deactivating device (reason 'none') [0]
Oct 27 20:24:34 s1.pavelow.net avahi-daemon[506]: Withdrawing address record for fe80::601:7cff:fef5:3c02 on eth1.

MariaDB.log(超长完整文件:http://pastebin.com/dgDDVgLv):

151027 19:58:18 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
151027 19:58:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151027 19:58:50 [Note] /usr/libexec/mysqld (mysqld 5.5.44-MariaDB) starting as process 14311 ...
151027 19:58:50 InnoDB: The InnoDB memory heap is disabled
151027 19:58:50 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151027 19:58:50 InnoDB: Compressed tables use zlib 1.2.7
151027 19:58:50 InnoDB: Using Linux native AIO
151027 19:58:50 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
151027 19:58:50 InnoDB: Completed initialization of buffer pool
151027 19:58:50 InnoDB: Fatal error: cannot allocate memory for the buffer pool
151027 19:58:50 [ERROR] Plugin 'InnoDB' init function returned error.
151027 19:58:50 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151027 19:58:50 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
151027 19:58:51 [Note] Plugin 'FEEDBACK' is disabled.
151027 19:58:51 [ERROR] Unknown/unsupported storage engine: InnoDB
151027 19:58:51 [ERROR] Aborting

151027 19:58:51 [Note] /usr/libexec/mysqld: Shutdown complete

151027 19:58:51 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended

提前感谢您的帮助。

答案1

根据您的错误日志,您没有足够的内存来以当前配置启动 MariaDB。有一些解决方案:如果可能,添加额外的 RAM;根据情况添加额外的交换此指令; 更改 MariaDB 配置以防止高内存使用率,例如减少innodb_buffer_pool_size到 RAM 的 80%根据这篇博客文章

相关内容