httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Krueger <benja...@seattlefenix.net>
Subject Re: [users@httpd] Unecessary wait / timeout
Date Sat, 15 Feb 2003 01:02:34 GMT
* Admin-Stress (meerkapot@yahoo.com) [030214 15:37]:
> Hi,
> 
> I just installed apache 1.3.27 using source code (tar.gz).
> My machine is linux redhat 8.0.
> 
> If I test my httpd using telnet, I got about 5 seconds before connection closed.
> 
>    > telnet 0 80
>    GET http://just.example.net HTTP/1.1
>    User-agent: blah blah
>    Host: 10.0.0.88
>    Content-type: text/html
> .....<html displayed here>.....
> 
> .....<delay 5 seconds>.....
>    Connection closed by foreign host.
> 
> This was never happened before, when I use redhat8.0 httpd rpm.
> 
> I tested (from the same machine) for example > telnet www.yahoo.com 80
> I did not get that delay 5 seconds, as soon as the html output finished, I got 'connection
closed
> by foreign host'.
> 
> Anyone know what should I change in the httpd.conf ? or how should I compile apache so
I wont get
> that unecessary delay? 
> 
> I dont use firewall, I dont use iptables.
> 
> Here is my apache installation script:
> cd /tmp
> tar -zxvf apache_1*.tar.gz
> cd apache_1*
> ./configure --with-layout=RedHat --enable-module=most --enable-shared=max
> make
> make install
> 
> Thanks,
> kapot

That delay is there on purpose. The webserver is waiting for the web client to send more requests,
and if the client doesn't send any more requests in a timely fashion, it disconnects. This
behavior
is called KeepAlive, or Persistent Connections and allows web clients to speed the downloading
of
content from the webserver by eliminating the overhead of establishing and using multiple
tcp 
connections. An example config that controls this behavior follows.

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

-- 
Benjamin Krueger

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message