What is the issue with Apache internal dummy connection?

2 Comments

apache_logo_thumb.jpgYou see several occurrences of this line in the “/var/log/httpd/access_log” file.
::1 – - [29/Nov/2006:17:39:04 -0800] “GET / HTTP/1.0″ 200 14083 “-” “Apache/x.y.z. (Fedora) (internal dummy connection)”
or
::1 – - [29/Nov/2006:17:39:04 -0800] “GET / HTTP/1.0″ 200 14083 “-” “Apache/x.y.z. (CentOS) (internal dummy connection)”
What does this mean?

It is an internal apache mechanism to handle the number of children. Your httpd.conf has wrong values for Max and Min spare servers.

InternalDummyConnection Requests From the Server to Itself

When the Apache HTTP Server manages its child processes, it needs a way to wake up processes that are listening for new connections. To do this, it sends a simple HTTP request back to itself. This request will appear in the access_log file with the remote address set to the loop-back interface (typically 127.0.0.1 or ::1 if IPv6 is configured). If you log the User-Agent string (as in the combined log format), you will see the server signature followed by “(internal dummy connection)” on non-SSL servers. During certain periods you may see up to one such request for each httpd child process.

These requests are perfectly normal and you do not, in general, need to worry about them.

If you wish to exclude them from your log, you can use normal conditional-logging techniques. For example, to omit all requests from the loopback interface from your logs, you can use

SetEnvIf Remote_Addr “127\.0\.0\.1″ loopback

and then add env=!loopback to the end of your CustomLog directive.

In 2.2.6 and earlier, in certain configurations, these requests may hit a heavy-weight dynamic web page and cause unnecessary load on the server. You can avoid this by using mod_rewrite to respond with a redirect when accessed with that specific User-Agent or IP address.

It’s away for Apache to signal its children that it’s time to die.This is usually nothing to be worried about.

If you are seeing many child processes spawn and die, you may want to have a look at your MinSpareServers and MaxSpareServers directives, and your MaxRequestsPerChild. You may also need to set MaxSpareServes to a value greater than MinSpareServers.

You may need to increase the value to a higher level to avoid this. Later, if it is an issue, you may need to restart Apache or the server for memory leak issue.

# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 8
MinSpareServers 8
MaxSpareServers 13
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 50

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

Tags: