我在 CentOS 7 上安装了 KVM VDS,安装了 hhvm、nginx 和 MariaDB,有几个静态网站(纯 html/css)和一个带数据库(实际上是 Wordpress)的 php 网站。今天晚上我收到了 uptime tracker 的通知,静态网站宕机了大约 40 分钟,WP 网站宕机了直到早上我手动重启 MariaDB。重启后,我检查了日志,发现表需要修复。
当晚的日志顺序:
171231 17:03:26 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.56-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
180128 01:59:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180128 1:59:04 [Note] /usr/libexec/mysqld (mysqld 5.5.56-MariaDB) starting as process 1150 ...
180128 1:59:04 InnoDB: The InnoDB memory heap is disabled
180128 1:59:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
180128 1:59:04 InnoDB: Compressed tables use zlib 1.2.7
180128 1:59:04 InnoDB: Using Linux native AIO
180128 1:59:04 InnoDB: Initializing buffer pool, size = 128.0M
180128 1:59:04 InnoDB: Completed initialization of buffer pool
180128 1:59:04 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
180128 1:59:04 InnoDB: Waiting for the background threads to start
180128 1:59:05 Percona XtraDB (http://www.percona.com) 5.5.52-MariaDB-38.3 started; log sequence number 18372705
180128 1:59:05 [Note] Plugin 'FEEDBACK' is disabled.
180128 1:59:05 [Note] Server socket created on IP: '0.0.0.0'.
180128 1:59:05 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 12: Cannot allocate memory
180128 1:59:05 [ERROR] Do you already have another mysqld server running on port: 3306 ?
180128 1:59:05 [ERROR] Aborting
180128 1:59:05 InnoDB: Starting shutdown...
180128 1:59:09 InnoDB: Shutdown completed; log sequence number 18372705
180128 1:59:09 [Note] /usr/libexec/mysqld: Shutdown complete
180128 01:59:09 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
180128 09:39:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
我想知道,到底发生了什么,是我的错,没有正确配置某些东西,还是我的主机提供商的错?我还应该检查什么?