这台 Amazon Linux 服务器运行着一个 WordPress 网站,该网站经常崩溃。解决这个问题的方法似乎是运行服务 mysqld 重启并恢复运行,直到再次崩溃。
160131 21:17:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160201 15:30:10 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160201 15:30:10 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 24089 ...
160201 15:30:10 [Note] Plugin 'FEDERATED' is disabled.
160201 15:30:10 InnoDB: The InnoDB memory heap is disabled
160201 15:30:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160201 15:30:10 InnoDB: Compressed tables use zlib 1.2.8
160201 15:30:10 InnoDB: Using Linux native AIO
160201 15:30:10 InnoDB: Initializing buffer pool, size = 128.0M
160201 15:30:10 InnoDB: Completed initialization of buffer pool
160201 15:30:10 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 4698648262
160201 15:30:10 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 4698648272
160201 15:30:10 InnoDB: Waiting for the background threads to start
160201 15:30:11 InnoDB: 5.5.46 started; log sequence number 4698648272
160201 15:30:11 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160201 15:30:11 [Note] - '0.0.0.0' resolves to '0.0.0.0';
160201 15:30:11 [Note] Server socket created on IP: '0.0.0.0'.
160201 15:30:11 [Note] Event Scheduler: Loaded 0 events
160201 15:30:11 [Note] /usr/libexec/mysql55/mysqld: ready for connections.
Version: '5.5.46' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
160202 04:42:41 mysqld_safe Number of processes running now: 0
160202 04:42:41 mysqld_safe mysqld restarted
160202 4:42:41 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 22903 ...
160202 4:42:41 [Note] Plugin 'FEDERATED' is disabled.
160202 4:42:41 InnoDB: The InnoDB memory heap is disabled
160202 4:42:41 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160202 4:42:41 InnoDB: Compressed tables use zlib 1.2.8
160202 4:42:41 InnoDB: Using Linux native AIO
160202 4:42:42 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160202 4:42:42 InnoDB: Completed initialization of buffer pool
160202 4:42:42 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160202 4:42:42 [ERROR] Plugin 'InnoDB' init function returned error.
160202 4:42:42 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160202 4:42:42 [ERROR] Unknown/unsupported storage engine: InnoDB
160202 4:42:42 [ERROR] Aborting
在 AWS 上,系统日志显示以下错误:
[5613656.990910] [16575] 48 16575 92137 2204 177 4 0 0 httpd
[5613656.994560] Out of memory: Kill process 15486 (mysqld) score 31 or sacrifice child
[5613656.997693] Killed process 15486 (mysqld) total-vm:892860kB, anon-rss:64220kB, file-rss:0kB
/dev/fd/11: line 1: /sbin/plymouthd: No such file or directory
initctl: Event failed Stopping atd: [ OK ]
知道这是啥吗?