码迷,mamicode.com
首页 > 其他好文 > 详细

The file named error_log is too large

时间:2015-10-11 14:10:17      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:

The file named error<sub>log</sub> is too large

The file named errorlog is too large

1 Problem

One day, when I install android-sdk, I found that one error "NO space left on the device". That‘s very strange. Because I have allocated 50G to mnt. So I check my computer‘s files. Then I found the file,*errorlog.1*, which size is 35G. Then search. The errorlog.1 is the error log file of apache. All apache errors/diagnostic information or other errors found during serving requests are logged to this file. So if you don‘t do something, it will be larger and larger.

2 Solution

edit /etc/httpd/conf/httpd.conf

#ErrorLog "/var/log/httpd/error_log"   #before
ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M"

#CustomLog "/var/log/httpd/access_log" common  #before
CustomLog "|bin/rotatelogs /var/log/httpd/access_log 86400" common
CustomLog "|bin/rotatelogs /var/log/httpd/access_log 5M" common

Author: mlhy

Created: 2015-10-11 日 13:41

Emacs 24.5.1 (Org mode 8.2.10)

The file named error_log is too large

标签:

原文地址:http://www.cnblogs.com/mlhy/p/4869164.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!