今天報(bào)警一條error:host xxxx has more lowmem_prunes,please add Memory...
我們提供的服務(wù)有:成都做網(wǎng)站、成都網(wǎng)站制作、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、天鎮(zhèn)ssl等。為千余家企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的天鎮(zhèn)網(wǎng)站制作公司
這個(gè)報(bào)警是一個(gè)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
官方文檔對(duì) Qcache_lowmem_prunes
的解釋:
The number of queries that were deleted from the query cache because of low memory.
大概意思是cache池滿了,所以導(dǎo)致的query修剪。
結(jié)合下面兩篇文章,做了如下決定:改my.cnf文件,query_cache_type=1->0 query_cache_size=1G->0
務(wù)必重啟
參考:http://t.cn/RAF4d7z http://t.cn/RAF4d7Z