Kloxo關(guān)閉日志和網(wǎng)站統(tǒng)計(jì),減少空間占用,避免vps無法正常工作
客戶反映空間不夠了,他說我使用的 www 空間, 其實(shí)是很少的,但50G空間都快滿了:
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 50G 47G 3.1G 94% /
官方說法:宇塵網(wǎng)絡(luò)幫助中心域名知識|虛擬主機(jī)知識|VPS主機(jī)知識|服務(wù)器知識|網(wǎng)站建設(shè)知識|網(wǎng)絡(luò)推廣
Every day, if the log file's size is larger than 50MB, they are moved into the client's home directory. If you set the remove_processed_logs as true, then instead of moving, they will be deleted. Your main statistics calculation will not be affected at all.
在Kloxo/Lxadmin里添加了一個(gè)域名,默認(rèn)的是打開了網(wǎng)站統(tǒng)計(jì).建議在添加域名時(shí)就關(guān)閉這個(gè)功能。如果沒有關(guān)閉統(tǒng)計(jì)并且流量很大,用不了多久硬盤就會(huì)被統(tǒng)計(jì)文件撐爆。如果你的MySQL不能正常啟動(dòng),很有可能是這個(gè)原因?梢栽谙聢D所示位置關(guān)掉統(tǒng)計(jì)
為避免這樣的情況發(fā)生,請作以下設(shè)置:
ssh登錄vps,刪除已有的統(tǒng)計(jì)文件
輸入命令:
rm -f /home/admin/__processed_stats/*
如果硬盤已經(jīng)占滿并且數(shù)據(jù)庫不能啟動(dòng),lxadmin不能打開,可以用SSH登錄到系統(tǒng)執(zhí)行刪除操作,命令:
rm -f /home/admin/__processed_stats/*
刪除之后啟動(dòng)MySQL,命令:
service mysqld start
避免以后還生成較多日志,建議每個(gè)域名都做以下設(shè)置:仿牌空間、香港月付空間、韓國月付空間、日本月付空間、荷蘭VPS、香港VPS
kloxo_del_logo.png
一個(gè)客戶的處理過程:
客戶反映kloxo無法進(jìn)入后臺,而且網(wǎng)站全部打不開。以查詢,能ping,能ssh。重啟了kloxo也不行。奇怪。于是 df一看,空間滿了。如下處理方式:美國月付空間、月付美國空間、美國VPS、美國服務(wù)器租用
[root@www.ctohome.com __processed_stats]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 20G 20G 0 100% /
[root@www.ctohome.com __processed_stats]# pwd
/home/admin/__processed_stats
[root@www.ctohome.com __processed_stats]# du -m -s .
19426 . 日志占用了19G
[root@vps76 __processed_stats]# rm -f /home/admin/__processed_stats/*
重新啟動(dòng)kloxo
service kloxo restart
更多技術(shù)知識,更多網(wǎng)絡(luò)服務(wù),盡在宇塵網(wǎng)絡(luò)。我們的成長,離不開你們的支持,宇塵網(wǎng)絡(luò),歡迎您的訪問。