eygle Eygle.
Web 2006-04-09

What's Mean "internal dummy connection"?

升级到Apache2.2之后,在Apache的日志中经常看到大量的internal dummy connection日志:

[root@systest logs]# tail -f access_log.20060409 |grep "internal dummy connection"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"
::1 - - "GET / HTTP/1.0" 200 68091 "-" "Apache/2.2.0 (Unix) PHP/5.1.2 (internal dummy connection)"

不知道是什么意思?哪位能指点一下,谢谢:)

感谢留言网友的指点,这些信息的含义为:
/* Create the request string. We include a User-Agent so that
* adminstrators can track down the cause of the odd-looking
* requests in their logs.
*/
srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ",
ap_get_server_version(),
" (internal dummy connection)\r\n\r\n", NULL);
通过修改Apache的配置文件可以在日志中屏蔽这些信息:
SetEnvIf Remote_Addr "::1" dontlog
CustomLog "|/usr/local/sbin/cronolog /opt/apache/logs/eygle_access_log.%Y%m%d" combined env=!dontlog
参考链接:
http://www.clusting.com/Apache/ApacheManual/logs.html http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?view=markup&pathrev=230808

 

By eygle 2006-04-09 16:48 评论 (5)
eygle
eygle

前Oracle ACE Director,云和恩墨创始人。技术为骨,历史为脉,人文为魂。

返回首页 →

5 Comments

http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?view=markup&pathrev=230808

/* Create the request string. We include a User-Agent so that
* adminstrators can track down the cause of the odd-looking
* requests in their logs.
*/
srequest = apr_pstrcat(p, "GET / HTTP/1.0\r\nUser-Agent: ",
ap_get_server_version(),
" (internal dummy connection)\r\n\r\n", NULL);

在日志里屏蔽记录

#cat http.conf
.....
.....

# Mark requests from the loop-back interface
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog
.....
.....

感谢这位朋友,我增加了如下判断屏蔽了这些信息:

SetEnvIf Remote_Addr "::1" dontlog
CustomLog "|/usr/local/sbin/cronolog /opt/apache/logs/eygle_access_log.%Y%m%d" combined env=!dontlog

不客气,关键是多道处理模块(MPM)的配置,我的服务器采用apache在unix上默认的prefork,
#./httpd -l |grep prefork
prefork.c

如下配置下,这个internal dummy connection提示信息就几乎没有了.

StartServers 50
MinSpareServers 50
MaxSpareServers 100
ServerLimit 2000
MaxClients 1000
MaxRequestsPerChild 1000

我照你这个配置修改了一下,看看是否可以消除这个信息。

Apache也真够强大和复杂的:)