Error writing file ‘/var/tmp/MYYQHzD6’ 这个主要是 /var分区满了 导致的,APACHE的日志文件过大,修改APACHE日志文件位置,我把文件改到/home/log下面 重启APACHE 恢复正常!
apache日志截断
rotatelogs
修改httpd.conf
Unix:customLog “|bin/rotatelogs logs/access%Y-%m-%d.log 86400” common
CustomLog “|bin/rotatelogs /var/logs/logfile 5M” common
ErrorLog “|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M”
Windows:CustomLog “|bin/rotatelogs.exe -l C:/Apache2/logs/access%Y-%m-%d.log 86400” common
这里“-l”是rotatelogs的一个参数,表明按照当地时间。
我的配置
SetEnvIf Request_URI “\.(js|css|jpg|jpeg|gif|png|bmp|cur)$” dontlog
CustomLog “|/bbb/aaa/bin/rotatelogs /opt/aaap/logs/%Y%m%d%H.log 432000 ” common env=!dontlog
cronolog
修改apache配置文件中相应部分:
CustomLog “|/usr/local/sbin/cronolog /opt/apache/logs/access_log.%Y%m%d” combined
我的配置
CustomLog “|bin/cronolog.exe C:/www.test.com/logs/simware.com-access%Y%m%d.log” common1 env=!dontlog