Question:
Hello,
I am trying to debug an issue where calling QuickGetStr can take a very long time for certain URL's.
I have created the following test case that takes 60 seconds to complete even though i've set my connect and read timeouts to be 3 seconds:
var httpTester = new Chilkat.Http();
if (!httpTester.IsUnlocked()) httpTester.UnlockComponent("xxxxxxxx");
httpTester.ConnectTimeout = 3;
httpTester.ReadTimeout = 3;
var startTime = DateTime.Now;
// Goto test URL to see what chilkat does as far as timing out - this call shouldn't take longer than a few seconds to complete
var html = httpTester.QuickGetStr("http://willow-grove-park-mall-dining.evesave.com/");
Console.WriteLine("Last Error Text: {0}", httpTester.LastErrorText);
Console.WriteLine("");
Console.WriteLine("Last Status: {0}", httpTester.LastStatus);
Console.WriteLine("Total Time to Visit URL: {0}", (DateTime.Now - startTime).TotalSeconds);
httpTester.Dispose();
The above test outputs:
Total Time to Visit URL: 60.0795215
With the following LastErrorText:
Last Error Text: ChilkatLog:
QuickGetStr:
DllDate: Jan 5 2015
ChilkatVersion: 9.5.0.47
UnlockPrefix: xxxxxx
Username: xxxxxx
Architecture: Little Endian; 64-bit
Language: .NET 4.5 / x64
VerboseLogging: 0
httpRequestStr:
a_quickReq:
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3015
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
quickHttpRequest:
httpVerb: GET
url: http://willow-grove-park-mall-dining.evesave.com/
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: willow-grove-park-mall-dining.evesave.com
httpPort: 80
ssl: 0
socket2Connect:
connect2:
connectSocket:
connect_ipv6_or_ipv4:
timeout waiting for connect to complete
numSec: 3
numMicroSec: 0
failedWaitToConnect: Socket operation timeout.
--connect_ipv6_or_ipv4
--connectSocket
ConnectFailReason: Timeout
--connect2
--socket2Connect
connect: Socket operation timeout.
ConnectFailReason: Timeout
connectElapsedMs: 3000
--openHttpConnection
--quickHttpRequest
--a_quickReq
--httpRequestStr
Failed.
--QuickGetStr
--ChilkatLog
Looking at the above LastErrorText, it seems like the Http library is trying to do multiple retries to the same URL, but i was under the assumption that the Http library itself shouldn't be doing the retries, rather i have code in place to do retries if the HTML comes back NULL.
Do you guys have any idea what is going on here and if there is anyway to fix this?
In production i am using timeouts of 60 seconds instead of 3 seconds in the test case, and calling QuickGetStr for this given URL takes over 28 minutes to return back, i need to figure out a way to fix this.
Your help in this matter would be greatly appreciated, thanks!
Test with the very latest version (v9.5.0.48). The problem is likely fixed. In any case, I'll also give it a test..
Just tested with the latest version, the issue appears to be fixed.
Thanks!
With v9.5.0.48 I get this:
ChilkatLog: QuickGetStr: DllDate: Mar 26 2015 ChilkatVersion: 9.5.0.48 UnlockPrefix: nbvfds.CBX0916 Username: CHILKAT13:Matt Architecture: Little Endian; 32-bit Language: Visual C++ 11.0 (32-bit) VerboseLogging: 0 url: http://willow-grove-park-mall-dining.evesave.com/ httpRequestStr: a_quickReq: quickHttpRequest: httpVerb: GET url: http://willow-grove-park-mall-dining.evesave.com/ openHttpConnection: Opening connection directly to HTTP server. httpHostname: willow-grove-park-mall-dining.evesave.com httpPort: 80 ssl: 0 socket2Connect: connect2: connectSocket: connect_ipv6_or_ipv4: timeout waiting for connect to complete numSec: 3 numMicroSec: 0 failedWaitToConnect: Socket operation timeout. --connect_ipv6_or_ipv4 --connectSocket ConnectFailReason: Timeout --connect2 --socket2Connect connect: Socket operation timeout. ConnectFailReason: Timeout --openHttpConnection --quickHttpRequest --a_quickReq --httpRequestStr Failed. --QuickGetStr --ChilkatLog