今天报警一条error:host xxxx has more lowmem_prunes,please add Memory...
这个报警是一个shell脚本写的
Qcache_lowmem_prunes=`$Procedure_source -h$host -P$Port -uadmin -pxxxx -e"show status" | grep "Qcache_lowmem_prunes" | awk ‘{print $2}‘` if [ $Qcache_lowmem_prunes -gt 700000000 ] then echo "$host has more lowmem_prunes,please add Memory" | mail -s "$host has more lowmem_prunes,now lowmem_prunes is $Qcache_lowmem_prunes `date +"%R %F"`" $maillist else echo "$host lowmem_prunes ok" fi
官方文档对 Qcache_lowmem_prunes
的解释:
The number of queries that were deleted from the query cache
because of low memory.
大概意思是cache池满了,所以导致的query修剪。
结合下面两篇文章,做了如下决定:改my.cnf文件,query_cache_type=1->0 query_cache_size=1G->0
务必重启
参考:http://t.cn/RAF4d7z http://t.cn/RAF4d7Z
时间: 2024-10-11 12:55:39