The documentation for the timeout directive in apache states that:
When writing data to the client, the length of time to wait for an acknowledgement of a packet if the send buffer is full.
But if the TCP stack does not receive and ACK, it will re-send the packet. So how do these 2 things interact? Does the apache timeout set an overall limit on re-tries before aborting the connection?
The context is a situation where curl pulls periodically fail with the error:
curl: (18) transfer closed with XXXXXX bytes remaining to read
and I'm trying to determine the exact reason.
Having taken a Wireshark trace on both client and server, it seems the server (apache) is terminating the session prematurely for some reason (so not a firewall or other forcing it closed). This is happening for 2 types of files which are frequently downloaded: large binary (100's mb mp4) files and small text files (~10kb). For the large files there is an apache log message:
The timeout specified has expired: [client :] AH01581: Timeout while writing data for URI /xxxx/xxxx/xxxx/ to the client
My current best guess is that this is just network congestion as the failures tend to clump together at certain times but I'd like to pin it down further if possible.
Configuration:
CentOS 6.6
Apache 2.4.16
Curl 7.19.7