centos系統(tǒng)wdcp面板中Apache錯誤日志文件占磁盤問題解決方案
最近天水網(wǎng)絡公司筆者在維護centos系統(tǒng)時發(fā)現(xiàn),wdcp面板下的Apache錯誤日志文件占滿了磁盤,導致網(wǎng)站無法登錄后臺。今天天水市網(wǎng)絡公司筆者教給大家這個問題的解決方案,希望能幫你解決問題。
為了減少不必要的寫操作開銷,提高系統(tǒng)性能,需要要設置一下錯誤日志級別,找到httpd.conf配置文件下,比如修改文件/www/wdlinux/apache/conf/httpd.conf
LogLevel: Control the number of messages logged to the error_log.
Possible values include: debug, info, notice, warn, error, crit,alert, emerg.
LogLevel warn
其中LogLevel用于調(diào)整記于錯誤日志中的信息的詳細程度。可以選擇下列級別,依照重要性降序排列:
Level Description Example
emerg 緊急 - 系統(tǒng)無法使用。 “Child cannot open lock file. Exiting”
alert 必須立即采取措施。 “getpwuid: couldn’t determine user name from uid”
crit 致命情況。 “socket: Failed to get a socket, exiting child”
error 錯誤情況。 “Premature end of script headers”
warn 警告情況。 “child process 1234 did not exit, sending another SIGHUP”
notice 一般重要情況。 “httpd: caught SIGBUS, attempting to dump core in …”
info 普通信息。 “Server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers)…”
debug 出錯級別信息 “Opening config file …”
默認級別是warn。建議使用 crit 級別的設置,這樣只記錄致命級別以上的日志,可減少垃圾日志。 把LogLevel warn更改為LogLevel crit 然后重啟apache即可。
相關熱詞搜索: centos,wdcp,Apache,錯誤日志,磁盤,解決方