MySQL崩溃了大量的系统资源

时间:2014-12-18 18:44:49

标签: php mysql wordpress centos

我有一个运行几个非常低流量的WordPress网站的centos服务器。由于某种原因MySQL不断崩溃。

在mysql日志文件中,有一行说明:

Fatal error: cannot allocate memory for the buffer pool

服务器有1.75gb的RAM,所以除非配置错误,我不太确定没有足够的ram。这是否暗示问题是ram问题?这是我的日志文件的一部分。我不太确定它有什么意思。

Version: '5.5.37'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
141218 06:52:12 mysqld_safe Number of processes running now: 0
141218 06:52:12 mysqld_safe mysqld restarted
141218  6:52:13 [Note] Plugin 'FEDERATED' is disabled.
141218  6:52:13 InnoDB: The InnoDB memory heap is disabled
141218  6:52:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141218  6:52:13 InnoDB: Compressed tables use zlib 1.2.3
141218  6:52:13 InnoDB: Using Linux native AIO
141218  6:52:13 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
141218  6:52:13 InnoDB: Completed initialization of buffer pool
141218  6:52:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool
141218  6:52:13 [ERROR] Plugin 'InnoDB' init function returned error.
141218  6:52:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141218  6:52:13 [ERROR] Unknown/unsupported storage engine: InnoDB
141218  6:52:13 [ERROR] Aborting

141218  6:52:13 [Note] /usr/libexec/mysqld: Shutdown complete

141218 06:52:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141218 18:15:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141218 18:15:42 [Note] Plugin 'FEDERATED' is disabled.
141218 18:15:42 InnoDB: The InnoDB memory heap is disabled
141218 18:15:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141218 18:15:42 InnoDB: Compressed tables use zlib 1.2.3
141218 18:15:42 InnoDB: Using Linux native AIO
141218 18:15:42 InnoDB: Initializing buffer pool, size = 128.0M
141218 18:15:42 InnoDB: Completed initialization of buffer pool
141218 18:15:42 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!
141218 18:15:42  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...
141218 18:15:42  InnoDB: Waiting for the background threads to start
141218 18:15:43 InnoDB: 5.5.37 started; log sequence number 143507172
141218 18:15:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141218 18:15:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
141218 18:15:43 [Note] Server socket created on IP: '0.0.0.0'.
141218 18:15:43 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure

141218 06:52:12 mysqld_safe mysqld restarted
141218  6:52:13 [Note] Plugin 'FEDERATED' is disabled.
141218  6:52:13 InnoDB: The InnoDB memory heap is disabled
141218  6:52:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141218  6:52:13 InnoDB: Compressed tables use zlib 1.2.3
141218  6:52:13 InnoDB: Using Linux native AIO
141218  6:52:13 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
141218  6:52:13 InnoDB: Completed initialization of buffer pool
141218  6:52:13 InnoDB: Fatal error: cannot allocate memory for the buffer pool
141218  6:52:13 [ERROR] Plugin 'InnoDB' init function returned error.
141218  6:52:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141218  6:52:13 [ERROR] Unknown/unsupported storage engine: InnoDB
141218  6:52:13 [ERROR] Aborting

141218  6:52:13 [Note] /usr/libexec/mysqld: Shutdown complete

141218 06:52:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
141218 18:15:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
141218 18:15:42 [Note] Plugin 'FEDERATED' is disabled.
141218 18:15:42 InnoDB: The InnoDB memory heap is disabled
141218 18:15:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141218 18:15:42 InnoDB: Compressed tables use zlib 1.2.3
141218 18:15:42 InnoDB: Using Linux native AIO
141218 18:15:42 InnoDB: Initializing buffer pool, size = 128.0M
141218 18:15:42 InnoDB: Completed initialization of buffer pool
141218 18:15:42 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!
141218 18:15:42  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...
141218 18:15:42  InnoDB: Waiting for the background threads to start
141218 18:15:43 InnoDB: 5.5.37 started; log sequence number 143507172
141218 18:15:43 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
141218 18:15:43 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
141218 18:15:43 [Note] Server socket created on IP: '0.0.0.0'.
141218 18:15:43 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
141218 18:15:43 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
141218 18:15:43 [Note] Event Scheduler: Loaded 0 events
141218 18:15:43 [Note] /usr/libexec/mysqld: ready for connections.

这是我的my.cnf文件:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

skip-host-cache
skip-name-resolve

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql

# Semisynchronous Replication
# http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1

# http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

0 个答案:

没有答案