apache child pid exit signal File size limit exceeded error


一个正常使用的网站,LAMP架构,突然打不开了,但是另外一个二级域名的网站,在同一台服务器上可以打开,静态文件也可以打开,因为出故障前有段时间程序没有更新,程序错误的可能性不大。
telnet 到网站的80端口,也可以打开,现象很奇怪。
重起了apache,没用,mysql用命令行也可以使用,没问题,一时没了方向。
于是tail了apache的log,一个是正常的web log,一个是error_log。
观察之后,发现了异常现象,apache的error_log一直输出错误信息如下:

[Thu May 24 23:11:27 2007] [notice] child pid 23406 exit signal File size limit exceeded (25)
[Thu May 24 23:12:01 2007] [notice] child pid 23544 exit signal File size limit exceeded (25)
[Thu May 24 23:12:47 2007] [notice] child pid 23633 exit signal File size limit exceeded (25)
[Thu May 24 23:12:53 2007] [notice] child pid 22799 exit signal File size limit exceeded (25)

说有文件大小超过了限制。
google了一下,说是超过了apache 2G的文件限制,试用find命令在系统里面查找超大的文件

find / -size +1000000k

查找到2个文件,一个是

/xxx/xxx/page_parse_time.log
/xxx/yyy/support-popbytes_log

第一个文件page_parse_time.log的大小在2G左右,压缩备份后,

> /xxx/xxx/page_parse_time.log

,问题解决。
page_parse_time.log的文件内容是程序记录sql query的log以及执行时间的log,每个页面请求都会写上一些数据,这么超过2G也不奇怪了。

上次还遇到过一次mysql数据条数过多,的问题
报错信息如下:

LOGSQL Insert Failed: insert into adodb_logsql (created,sql0,sql1,params,tracer,timer) values( NOW(),?,?,?,?,?) The table 'adodb_logsql' is full 

经查

mysql> select count(*) from adodb_logsql ;
 +----------+ 
| count(*) |
 +----------+ 
| 33127244 | 
+----------+

3千万,,,可能是有点大了,最后truncate了这个表,问题解决
可是最后查mysql的文档,关于Scalability and Limits部分没有说mysql最多可以存多少条记录,估计跟表的类型也相关。原文说的是
Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows.
只是不知道它说的50 million是一个database里面的所有记录还是所有表的记录加起来。后边的应该是所有60,000个表加起来的数据量。
————————
结论,必要的日志是需要的,但是要控制大小,有循环机制,或者有监控机制,切记,切记。


发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据