Bidirectional chunk
Hi.
I recently handled a case in which I had to use large files transactions (>=20GB) & I tested various combinations of HTTP-related parameters:
- Chunked
- POST/GET
- small/large files
- HTTP 1.0/1.1
Before I describe the special scenario in which I had difficulties, let me list what worked:
- POST with 20GB content (POST content).
- GET with 20GB content (in response).
- Both above using chunked-encoding.
The above led me to test a special scenario: POST with large content (1MB) & as response from the server, I expected to get 1MB body (using a simple CGI script which simply echoed a 1MB file that resides on the server).
I noticed at first, that there were many packets with Zero TCP Window Size & after I increased it (on both client & server & both send & receive buffers), I noticed that all the POST is sent to the server & ACKed, but nothing is received in response & all I see are TCP Keepalive packets between the client & the server.
I reduced the POST content to 60K & it also occurred consistently.
When using ~50K POST content size, I noticed that not all 100% of the transaction attempts fail.
With a very small POST content size (46 bytes), it always worked.
After trying to tune httpd.conf, linux internal parameters under /proc, I have no clue how to solve it & I have not tried an alternative for Apache, since I think it is related to the kernel (but then again, maybe my assumption is incorrect).
Any help/ideas will be very much appreciated.
|