真的很奇怪啊,我不知道是阿里云故意攻击还是怎么回事,10分钟也就100多M缓存,我设置了定时任务10分钟清理一次缓存,结果7小时后,今天早上7点半MYSQL 又挂了。
服务器是 1G内存 1核 一天也就几百IP, 以前512M的云服务器一天2万流量都没出过MYSQL挂B的事情,搞不明白到底怎么了。
190121 7:24:43 [Note] Plugin 'FEDERATED' is disabled.
190121 7:24:43 InnoDB: The InnoDB memory heap is disabled
190121 7:24:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190121 7:24:43 InnoDB: Compressed tables use zlib 1.2.7
190121 7:24:43 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12
190121 7:24:43 InnoDB: Completed initialization of buffer pool
190121 7:24:43 InnoDB: Fatal error: cannot allocate memory for the buffer pool
190121 7:24:43 [ERROR] Plugin 'InnoDB' init function returned error.
190121 7:24:43 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190121 7:24:43 [ERROR] Unknown/unsupported storage engine: InnoDB
190121 7:24:43 [ERROR] Aborting
190121 7:24:43 [Note] /www/wdlinux/mysql-5.5.58/bin/mysqld: Shutdown complete
刚设置了
# mysql conf /etc/my.cnf
# Created by http://www.wdlinux.cn
# Last Updated 2010.06.01
[client]
port = 3306
socket = /tmp/mysql.sock
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 128M
innodb_buffer_pool_size = 64M -------------这行是新增加的
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
myisam_sort_buffer_size = 8M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
max_connections = 300
wait_timeout = 30
interactive_timeout = 30
max_connect_errors = 9
long_query_time = 1
tmp_table_size = 16M
#log-bin=mysql-bin
#binlog_format=mixed
#server-id = 1
[mysqldump]
quick
max_allowed_packet = 8M
[mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 12M
sort_buffer_size = 1M
read_buffer = 1M
write_buffer = 1M
[mysqlhotcopy]
interactive-timeout
innodb_buffer_pool_size = 8M (安装MySQL5.6到小于1G内存服务器上,启动MySQL会失败,报内存分配失败的错误,此时,需要修改my.cnf的内存大小从标准128M设置到8M或者64M)
说是还要加虚拟内存,我记得2015年WD面板里好像有启用虚拟内存的,现在居然没有这个虚拟内存了
不知道该怎么办?对于数据库自动关闭,WD是不是可以想几个办法来解决呢?
比如 做一个自动检测开关给大家选择 MYSQL无法连接则重启服务器或重启MYSQL。
技术能解答一下么?谢谢