0

I use Fiddler for performance evalutions, and noticed that some HTTP calls consistently takes ~1000ms.

This is not random; out of 3 calls in a scenario, it is consistently the same call that is slow, but this may change after a restart.

I have used a lot of time finding the culprit in my code, but after disabling Fiddler the problem immediately disappeared, the request then takes 80ms as it should.

Note from the screenshot that the first call is slow, the TCP connect to localhost takes 1001ms, but I have also observed this issue on the second call instead of the first, and in other scenarios.

I connect to an Apache Tomcat server on Windows 10.

I have disabled any "modem simulations". The target server and Fiddler itself is on localhost.

I am using the latest release (version 4.6.2.2).

Is there any way to avoid this latency?

Request Count: 1
Bytes Sent: 1 519 (headers:385; body:1 134)
Bytes Received: 5 090 (headers:518; body:4 572)
ACTUAL PERFORMANCE
--------------
ClientConnected: 09:44:00.885
ClientBeginRequest: 09:44:00.886
GotRequestHeaders: 09:44:00.886
ClientDoneRequest: 09:44:00.886
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 1001ms    <============
HTTPS Handshake: 0ms
ServerConnected: 09:44:01.888
FiddlerBeginRequest: 09:44:01.888
ServerGotRequest: 09:44:01.888
ServerBeginResponse: 09:44:01.964
GotResponseHeaders: 09:44:01.964
ServerDoneResponse: 09:44:01.964
ClientBeginResponse: 09:44:01.964
ClientDoneResponse: 09:44:01.964
Overall Elapsed: 0:00:01.078
RESPONSE BYTES (by Content-Type)
--------------
application/xml: 4 572
~headers~: 518

Timeline

Karl Ivar Dahl
  • 1,023
  • 2
  • 11
  • 23

1 Answers1

0

With the help from Eric Lawrence in his answer the issue was resolved by using 127.0.0.1 instead of localhost.

To be honest, I do not know at this point why this resolves the issue, or if I can make localhost work properly by changing my configuration somehow. I will post updates if I learn more.

Karl Ivar Dahl
  • 1,023
  • 2
  • 11
  • 23
  • Ok, it is probably related to IPv6. See http://stackoverflow.com/questions/11310564/php-to-easyphp-mysql-server-1-second-connection-delay for a related discussion. – Karl Ivar Dahl Mar 08 '16 at 11:56