Configuration file /etc/apache2/apache.conf .
Misunderstanding arose because of the description:

KeepAliveTimeout Directive. Once a request has been received, the timeout directive applies .

What does "As soon as the request was received, the timeout specified in the TimeOut directive applies"? How do these two timeouts touch?

    1 answer 1

    KeepAlive allows you to make multiple requests in a single TCP connection. This is especially useful for html pages with lots of images. If KeepAlive is set to Off, then a separate connection will be created for the page itself and for each image (which will need to be processed by the master process), which is bad for both the server and the client. So for such cases it is recommended to set KeepAlive to On. For other applications (for example, for a download server), KeepAlive may be useless and even harmful, because when KeepAlive is on, the server does not close the connection immediately, but waits for KeepAliveTimeout seconds of the new request. To keep processes from hanging for too long in idle waiting, set KeepAliveTimeout small enough, usually about 5-10 seconds is enough.

    • Thanks for the answer. But you only explained why KeepAlive is needed, and my question is the difference KeepAliveTimeout and TimeOut is simple. The misunderstanding arises from the strange description: "Once the request has been received, the timeout directive applies." I translated as "Once a request has been received, the wait time specified in the TimeOut directive is applied." What does this mean? Descriptions of directives found here - httpd.apache.org/docs/2.2/mod/core.html#timeout . - aryndin
    • Are you not clear about the difference between KeepAliveTimeout and TimeOut after reading my answer? - Mstislav Pavlov