Question:
CkHttp::Download is periodically failing for one of my customers that has a slow internet connection. Apparently there are lots of people on their connection at times. This is part of a "check for updates" feature in my app which first downloads a small text file with the version info and then downloads the necessary replacement ZIP file (1-2MB). The small text file always succeeds but most of the time the larger file fails on download for this customer. No other customers report any download issues so I believe it's associated with their internet connection being slow and perhaps a timeout used by CkHttp during the download process needing to be lengthened.
The following is the error message when the download fails(the actual URL has been changed for security reasons):
ERROR: ChilkatLog:
Download:
DllDate: Jul 9 2013
ChilkatVersion: 9.4.1.26
UnlockPrefix: npirasHttp
Username: OWNER-PC:OWNER
Architecture: Little Endian; 32-bit
Language: Visual C++ 11.0
VerboseLogging: 0
backgroundThread: 0
url: http://www.<remainder of="" url="" has="" been="" hidden="">
toLocalPath: C:UsersOWNERAppDataLocalTempDownload#0.tmp
localFileAlreadyExists: 0
QuickGetToOutput_Download:
qGet_1:
simpleHttpRequest_3:
httpMethod: GET
requestUrl: http://www.<remainder of="" url="" has="" been="" hidden="">
Using existing connection to web server...
-- BuildGetRequest --
Not auto-adding cookies.
sendElapsedMs: 0
Timeout waiting to read socket or accept connection
timeoutMs: 20000
Failed to get response header
--simpleHttpRequest_3
--qGet_1
--QuickGetToOutput_Download
bFileDeleted: 1
totalElapsedMs: 19999
ContentLength: 0
Failed.
--Download
--ChilkatLog
The user reports that it fails after about 20 seconds which is what the timeout in the error message indicates. But I'm wondering if there is some other timeout involved that needs to be adjusted since Internet Explorer has no problem retrieving the file via the same URL.
As a side note, I'm linking to ver 11 of the Chilkat libs although it shows in the above error that it's version 9. Why wouldn't it be 11.x?
Thanks, Phil
My guess is that you simply need to increase the timeout.
I'm not sure where you see "version 11"? Maybe you're thinking of the version of Visual C++ itself (VC++ 11.0)? The version of Chilkat would have nothing to do with the version of Visual C++. (In other words, Chilkat v9.4.1 is offered for many versions of Visual C++)
If you wish to potentially see better information in LastErrorText, here is a new pre-release that may be better in this respect:
http://www.chilkatsoft.com/preRelease/chilkat-9.4.1-x86-vc11.zip
Ok, I'll increase the timeout and see if that helps them.
You're right on the version, my mistake. I was linking to the libs in the ChilkatVC11 folder and without thinking about it thought it was ver 11 of Chilkat which obviously it's VC11 instead.
Thanks, Phil
Just reporting back. I increased the timeout from 20 to 40 seconds and the user that had the problem reports that took care of the issue and they can download successfully. For whatever reason I guess 20 was too short for their internet connection.