It seems to occur as file sizes get over the 100MB range. While not looking
fo GB uploads, would like to provide for 200MB.
It does seem to occur when on a lesser horsepower web server.
With TaskMan up and monitoring on both machines, you can see the CPU &
Network spike as usual, the file most often actually gets written to the
disk.
However on the client after the WinHttpWriteData loop, when calling
WinHttpReceiveResponse there is the 30 pause before getting the Timeout.
I pushed it up to 60 seconds but you can observe the server settling down
and cleaning up as if it has completed all of its tasks.
It is almost as if the WinHTTP client somehow missed getting its response?
This occurs whether the web server is accepting uploads by way of ASP.NET
2.0 or an ISAPI extention.
The client code is pretty much the Platform SDK sample code, would anyone
know how to ensure things move along smoother?
Thanks,
- Mike
A couple things to check first:
1. Ensure you are uploading all the data your request says it will,
according to the dwTotalLength parameter of WinHttpSendRequest. If you are
off (under) by even 1 byte, the server will still be waiting for your client
to finish uploading the request data and may not send a response.
2. Use a network sniffer like Ethereal to ensure the server is not aborting
the TCP connection (look for a RST indication). If that looks OK, then check
whether or not the server is sending a 200 OK response back to your client.
If it is, check that its response headers are properly terminated with an
extra CRLF sequence (the last response header should have two CRLF pairs
following it).
3. Try sending the request with keep-alive (persistent connections)
disabled. To do that, include a "Connection: Close" request header in the
call to WinHttpSendRequest.
Hope that helps.
Regards,
- Stephen
I had to leave for a bit, some end of year vacation time.
But anyhow, using Wireshark, I do find a reset (RST), it is the very last
entry.
The file does upload, the sizes are good.
I added and see the "Connection: Close" in the header but still get the same
timeout behavior, and only when getting up near 200MB.
I do calculate the size of the entire multipart-form that is POSTed.
- Mike
"Stephen Sulzer" <sasulzer_at_seanet.com> wrote in message
news:LJ6dnUeCu9C8GefY...@seanet.com...
If the server is malfunctioning with larger file sizes, then could the file
be sent in pieces over multiple HTTP requests?
- Stephen
"mike" <m...@m.com> wrote in message
news:O3htjZPN...@TK2MSFTNGP04.phx.gbl...
Yes I am working on the server side as well. I have been testing with two
server-side solutions ASP.NET or ISAPI whichever gets the job done.
> If the server is malfunctioning with larger file sizes, then could the
> file be sent in pieces over multiple HTTP requests?
The behavior is really looking to somehow be related to stress
(file-size:server-horsepower). Is it OK to ask? What are your thoughts on
the multiple HTTP requests?
I had sketched out a an idea but I might be looking at it, too close to my
nose. I was thinking that I would need to break the large files up and
insert each chunk into their own form for posting.
I went that direction because of ASP.NETs 4MB default, which I've had to
override with a web.config file httpRuntime stanza's maxRequestLength=
parameter. I am not comfortable doing that so got to thinking about the
chunks.
Now the ISAPI would is not affected in this category, which is why I am
surprised to see the behavior there as well.
- Mike