数据库经常挂掉
军哥,lnmp 1.3,最近数据库经常挂掉,数据库错误日志内容如下:170611 18:06:52 mysqld_safe Number of processes running now: 0
170611 18:06:52 mysqld_safe mysqld restarted
2017-06-11 18:06:53 0 /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 32286 ...
2017-06-11 18:06:53 32286 Plugin 'FEDERATED' is disabled.
2017-06-11 18:06:53 32286 InnoDB: Using atomics to ref count buffer pool pages
2017-06-11 18:06:53 32286 InnoDB: The InnoDB memory heap is disabled
2017-06-11 18:06:53 32286 InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-06-11 18:06:53 32286 InnoDB: Memory barrier is not used
2017-06-11 18:06:53 32286 InnoDB: Compressed tables use zlib 1.2.3
2017-06-11 18:06:53 32286 InnoDB: Using CPU crc32 instructions
2017-06-11 18:06:53 32286 InnoDB: Initializing buffer pool, size = 256.0M
InnoDB: mmap(274726912 bytes) failed; errno 12
2017-06-11 18:06:53 32286 InnoDB: Cannot allocate memory for the buffer pool
2017-06-11 18:06:53 32286 Plugin 'InnoDB' init function returned error.
2017-06-11 18:06:53 32286 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-06-11 18:06:53 32286 Unknown/unsupported storage engine: InnoDB
2017-06-11 18:06:53 32286 Aborting
2017-06-11 18:06:53 32286 Binlog end
2017-06-11 18:06:53 32286 Shutting down plugin 'partition'
2017-06-11 18:06:53 32286 Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-06-11 18:06:53 32286 Shutting down plugin 'ARCHIVE'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_FIELDS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_INDEXES'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_SYS_TABLES'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_CONFIG'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_DELETED'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_METRICS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMPMEM'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMP_RESET'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_CMP'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_LOCK_WAITS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_LOCKS'
2017-06-11 18:06:53 32286 Shutting down plugin 'INNODB_TRX'
2017-06-11 18:06:53 32286 Shutting down plugin 'BLACKHOLE'
2017-06-11 18:06:53 32286 Shutting down plugin 'CSV'
2017-06-11 18:06:53 32286 Shutting down plugin 'MyISAM'
2017-06-11 18:06:53 32286 Shutting down plugin 'MRG_MYISAM'
2017-06-11 18:06:53 32286 Shutting down plugin 'MEMORY'
2017-06-11 18:06:53 32286 Shutting down plugin 'sha256_password'
2017-06-11 18:06:53 32286 Shutting down plugin 'mysql_old_password'
2017-06-11 18:06:53 32286 Shutting down plugin 'mysql_native_password'
2017-06-11 18:06:53 32286 Shutting down plugin 'binlog'
2017-06-11 18:06:53 32286 /usr/local/mysql/bin/mysqld: Shutdown complete
170611 18:06:53 mysqld_safe mysqld from pid file /usr/local/mysql/var/iZbp1h44q15c9j13hfqfdeZ.pid ended
是不是不支持innodb的问题?
谢谢。 按提示是无法分配内存,也就是内存不够用了
可以先调整/etc/my.conf 中 innodb_buffer_pool_size 调小些看看 好的,之前是256,现在调整到128了;
继续观察中,感谢军哥/ 军哥,你好:
调整到128M之后,坚持了两天,数据库又挂了,一下是这次的数据库日志,还能调整到64M,还是有其它可以继续优化?
又出现了 Unknown/unsupported storage engine: InnoDB ,是不是默认没有开启支持InnoDB的原因?
5305 170614 19:15:29 mysqld_safe Number of processes running now: 0
5306 170614 19:15:29 mysqld_safe mysqld restarted
5307 2017-06-14 19:15:30 0 /usr/local/mysql/bin/mysqld (mysqld 5.6.29-log) starting as process 28604 ...
5308 2017-06-14 19:15:30 28604 Plugin 'FEDERATED' is disabled.
5309 2017-06-14 19:15:30 28604 InnoDB: Using atomics to ref count buffer pool pages
5310 2017-06-14 19:15:30 28604 InnoDB: The InnoDB memory heap is disabled
5311 2017-06-14 19:15:30 28604 InnoDB: Mutexes and rw_locks use GCC atomic builtins
5312 2017-06-14 19:15:30 28604 InnoDB: Memory barrier is not used
5313 2017-06-14 19:15:30 28604 InnoDB: Compressed tables use zlib 1.2.3
5314 2017-06-14 19:15:30 28604 InnoDB: Using CPU crc32 instructions
5315 2017-06-14 19:15:30 28604 InnoDB: Initializing buffer pool, size = 128.0M
5316 InnoDB: mmap(137363456 bytes) failed; errno 12
5317 2017-06-14 19:15:30 28604 InnoDB: Cannot allocate memory for the buffer pool
5318 2017-06-14 19:15:30 28604 Plugin 'InnoDB' init function returned error.
5319 2017-06-14 19:15:30 28604 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
5320 2017-06-14 19:15:30 28604 Unknown/unsupported storage engine: InnoDB
5321 2017-06-14 19:15:30 28604 Aborting
5322
5323 2017-06-14 19:15:30 28604 Binlog end
5324 2017-06-14 19:15:30 28604 Shutting down plugin 'partition'
5325 2017-06-14 19:15:30 28604 Shutting down plugin 'PERFORMANCE_SCHEMA'
5326 2017-06-14 19:15:30 28604 Shutting down plugin 'ARCHIVE'
5327 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_DATAFILES'
5328 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_TABLESPACES'
5329 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
5330 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_FOREIGN'
5331 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_FIELDS'
5332 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_COLUMNS'
5333 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_INDEXES'
5334 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_TABLESTATS'
5335 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_SYS_TABLES'
5336 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_INDEX_TABLE'
5337 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_INDEX_CACHE'
5338 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_CONFIG'
5339 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_BEING_DELETED'
5340 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_DELETED'
5341 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
5342 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_METRICS'
5343 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
5344 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
5345 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_BUFFER_PAGE'
5346 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
5347 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMP_PER_INDEX'
5348 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMPMEM_RESET'
5349 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMPMEM'
5350 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMP_RESET'
5351 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_CMP'
5352 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_LOCK_WAITS'
5353 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_LOCKS'
5354 2017-06-14 19:15:30 28604 Shutting down plugin 'INNODB_TRX'
5355 2017-06-14 19:15:30 28604 Shutting down plugin 'BLACKHOLE'
5356 2017-06-14 19:15:30 28604 Shutting down plugin 'CSV'
5357 2017-06-14 19:15:30 28604 Shutting down plugin 'MyISAM'
5358 2017-06-14 19:15:30 28604 Shutting down plugin 'MRG_MYISAM'
5359 2017-06-14 19:15:30 28604 Shutting down plugin 'MEMORY'
5360 2017-06-14 19:15:30 28604 Shutting down plugin 'sha256_password'
5361 2017-06-14 19:15:30 28604 Shutting down plugin 'mysql_old_password'
5362 2017-06-14 19:15:30 28604 Shutting down plugin 'mysql_native_password'
5363 2017-06-14 19:15:30 28604 Shutting down plugin 'binlog'
5364 2017-06-14 19:15:30 28604 /usr/local/mysql/bin/mysqld: Shutdown complete
5365
5366 170614 19:15:30 mysqld_safe mysqld from pid file /usr/local/mysql/varxxxxx.pid ended
谢谢军哥~
回复 4# 的帖子
没开启innodb就不是这个提示了就是内存不够用了,没内存可供分配使用了
你看一下你内存占用情况
你机器什么配置? 1核2G内存;
centos 7
回复 6# 的帖子
没内存占用情况没法说调整 innodb_buffer_pool_size 不行就只能升级配置了 现在是128M了,还有必要调整到64M吗?
回复 8# 的帖子
没法升级就只能再往小里调,但是如果使用的innodb引擎的话可能会影响mysql性能
页:
[1]