修改配置文件之后产生的Apache日志屏蔽了这些信息,表面上日志中不再记录这些内部进程的通信,但是这并不代表问题不存在。那深究一下同样的环境下,为什么这些信息只出现在一个站点上而其他站点没有类似的问题?又为什么会产生这些信息呢?
这些信息是为了方便管理员在日志中查找出错误的请求
/* 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);
internal dummy connection的产生是因为apache的MPM模块用prefork方式工作,而用worker MPM则不会使用pipe of death在进程间通信,也就不会有internal dummy connections的问题。
It's defined in /server/mpm_common.c:
| This function connects to the server, then immediately closes the
| connection.
| This permits the MPM to skip the poll when there is only one listening
| socket, because it provides a alternate way to unblock an accept()
| when the pod is used.
pod=pipe of death.
| The pipe of death is used to tell all child processes that it is time
| to die gracefully.
So if you use the worker MPM which doesn't use a pod, there are no
internal dummy connections anymore.