Fiddler automatically replays the request

953 views
Skip to first unread message

bharat kandoi

unread,
Apr 22, 2016, 2:09:00 PM4/22/16
to Fiddler
Hi

I wanted to discuss a particular behavior I saw in Fiddler and if there is a way around it.

We send the request using fiddler. The request takes a lot of time on the server (> 1min), therefore the connection remains idle. 
On the server side we noticed that fiddler ended up sending the request twice (which causes issue since the thread created by the first request in still executing). From the client (fiddler side) I just see one request but whenever this happens we notice this on the trace properties

REUSE ServerPipe#9916REUSE ServerPipe#9974

OR 

REUSE ServerPipe#1350*NEW*


To me this indicates multiple requests. Anyone else observer this? Can I configure fiddler to not replay the request in this case



bharat kandoi

unread,
Apr 22, 2016, 2:21:36 PM4/22/16
to Fiddler
To Add more. Our load balancer should cancel the connection if the idle time is more than 1 min. In that case I would want fiddler to not retry but just fail

Eric Lawrence

unread,
Apr 22, 2016, 4:53:08 PM4/22/16
to Fiddler
Many clients will time out if the server fails to respond to a request in a timely manner; if the request times out with no data returned, in some cases a client is permitted to retry the request on a new connection. Sharing the timers (See the Statistics tab) for this Session may help clarify exactly what you're seeing.

To avoid retries, the server should send the HTTP headers immediately and stream the body (e.g. using Transfer-Encoding: chunked) as it is read or generated. If the server cannot generate a response in a timely fashion, it should consider returning a "status" message and the client can poll for the completion.

Having said that, if you're not in a position to fix the service, you can change Fiddler to lengthen the timeout. 

In QuickExec beneath Fiddler's Web Sessions list, type

   prefs set fiddler.network.timeouts.serverpipe.receive.initial 300000

Hit Enter, then type

   prefs set fiddler.network.timeouts.serverpipe.receive.reuse 300000

And hit Enter. These will change the server read timeouts to 5 minutes.

bharat kandoi

unread,
Apr 22, 2016, 6:23:19 PM4/22/16
to Fiddler
Here is the statistics tab of the request that I know played twice

Request Count:   1
Bytes Sent:      2,749 (headers:1,257; body:1,492)
Bytes Received:  5,169 (headers:528; body:4,641)

ACTUAL PERFORMANCE
--------------

This traffic was captured on Thursday, April 21, 2016.


NOTE: This request was retried after a Receive operation failed.

ClientConnected: 16:41:15.914
ClientBeginRequest: 16:41:25.867
GotRequestHeaders: 16:41:25.867
ClientDoneRequest: 16:41:25.867
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 78ms
HTTPS Handshake: 837ms
ServerConnected: 16:42:27.070
FiddlerBeginRequest: 16:42:27.914
ServerGotRequest: 16:42:27.914
ServerBeginResponse: 16:42:54.305
GotResponseHeaders: 16:42:54.305
ServerDoneResponse: 16:42:54.398
ClientBeginResponse: 16:42:54.305
ClientDoneResponse: 16:42:54.398

Overall Elapsed: 0:01:28.531

RESPONSE BYTES (by Content-Type)
--------------
text/plain: 4,641
 ~headers~: 528


ESTIMATED WORLDWIDE PERFORMANCE
--------------
The following are VERY rough estimates of download times when hitting servers based in Seattle.

US West Coast (Modem - 6KB/sec)
RTT: 0.10s
Elapsed: 1.10s

Japan / Northern Europe (Modem)
RTT: 0.15s
Elapsed: 1.15s

China (Modem)
RTT: 0.45s
Elapsed: 1.45s

US West Coast (DSL - 30KB/sec)
RTT: 0.10s
Elapsed: 0.10s

Japan / Northern Europe (DSL)
RTT: 0.15s
Elapsed: 0.15s

China (DSL)
RTT: 0.45s
Elapsed: 0.45s


________________
Learn more about HTTP performance at http://fiddler2.com/r/?HTTPPERF




Here is the properties

SESSION STATE: Done.
Request Entity Size: 1492 bytes.
Response Entity Size: 4641 bytes.

== FLAGS ==================
BitFlags: [IsHTTPS, ClientPipeReused, ResponseStreamed, LoadedFromSAZ] 0x249
UI-COMMENTS: [#1356]
X-CLIENTIP: ::ffff:127.0.0.1
X-CLIENTPORT: 62193
X-EGRESSPORT: 62388
X-HOSTIP: 134.170.127.148
X-PROCESSINFO: latch:4816
X-RESPONSEBODYTRANSFERLENGTH: 4641
X-RETRYONFAILEDRECEIVE: *
X-SERVERSOCKET: REUSE ServerPipe#1350*NEW*

== TIMING INFO ============

This traffic was captured on Thursday, April 21, 2016.

ClientConnected: 16:41:15.914
ClientBeginRequest: 16:41:25.867
GotRequestHeaders: 16:41:25.867
ClientDoneRequest: 16:41:25.867
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 78ms
HTTPS Handshake: 837ms
ServerConnected: 16:42:27.070
FiddlerBeginRequest: 16:42:27.914
ServerGotRequest: 16:42:27.914
ServerBeginResponse: 16:42:54.305
GotResponseHeaders: 16:42:54.305
ServerDoneResponse: 16:42:54.398
ClientBeginResponse: 16:42:54.305
ClientDoneResponse: 16:42:54.398

Overall Elapsed: 0:01:28.531

The response was streamed to the client as it was received.

== WININET CACHE INFO ============
This URL is not present in the WinINET cache. [Code: 2]
* Note: Data above shows WinINET's current cache state, not the state at the time of the request.
* Note: Data above shows WinINET's Medium Integrity (non-Protected Mode) cache only.


bharat kandoi

unread,
Apr 25, 2016, 1:20:06 PM4/25/16
to Fiddler
Eric, Any insights based on the info above?

Eric Lawrence

unread,
Apr 25, 2016, 1:23:22 PM4/25/16
to httpf...@googlegroups.com
Yeah, everything I said originally still applies. Your Load Balancer kills the connection after a minute, so Fiddler retries. You can change Fiddler's timeout to longer to wait longer, but that won't help if your Load Balancer is killing the connection. You should consider changing your server to return headers immediately; if Fiddler streams those to the client, the request will not be retried.

If you upgrade to the latest beta version, the CONFIG.RetryOnReceiveFailure property can be set from Script; you can change it to RetryMode.Never to prevent resends.

bharat kandoi

unread,
Apr 25, 2016, 5:04:37 PM4/25/16
to Fiddler
I see. Lets say if the load balancer had not killed the connection, then what would fiddler's behavior be? I guess it would sill retry, whats the default timeout?. 
I have not found this behavior to be deterministic.

bharat kandoi

unread,
Apr 25, 2016, 5:18:41 PM4/25/16
to Fiddler
Also, is the feature to disable retries available or will be available on earlier version? 

Tsviatko Yovtchev

unread,
Apr 26, 2016, 9:29:09 AM4/26/16
to Fiddler
Is there a problem with the new version? If so, please, let me know. I might be able to help with it.

Michael Pang

unread,
Aug 5, 2016, 5:54:59 AM8/5/16
to Fiddler
Hi all,

Currently, I encounter the same situation in which I have some requests send to server being duplicated. I would like to see how can I disable this feature? I know that there is a property as mentioned above, the CONFIG.RetryOnReceiveFailure property. But I don't know how to set it?

I have tried to show all the prefs by using the quickedit with about:config. But seems no such property there. Can anyone tell me how to disable auto rety on failure?

Many thx.

Cheers
Message has been deleted

Eric Lawrence

unread,
Aug 5, 2016, 12:10:22 PM8/5/16
to Fiddler
Michael-- I'd caution you to be very careful in assuming that you're seeing the same thing. If you encounter the issue described, the server or network is misconfigured and should be fixed.

In terms of changing Fiddler's behavior:

Click Rules > Customize Rules. Scroll to

    static function Main() {

and inside it, add

    Fiddler.CONFIG.RetryOnReceiveFailure = Fiddler.RetryMode.Never;

Save the file.

Michael Pang

unread,
Aug 15, 2016, 10:36:28 PM8/15/16
to Fiddler
Thanks Eric.

Sorry for my later response. (I find that no alert message is sent to me on someone reply to this thread).

For my case, actually I have the following log from fiddler 

NOTE: This request was retried after a Receive operation failed.

ClientConnected: 14:49:06.742
ClientBeginRequest: 14:49:11.488
GotRequestHeaders: 14:49:11.488
ClientDoneRequest: 14:49:11.489
Determine Gateway: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 7ms
HTTPS Handshake: 5154ms
ServerConnected: 14:49:17.235
FiddlerBeginRequest: 14:49:17.226
ServerGotRequest: 14:49:17.227
ServerBeginResponse: 14:49:17.221
GotResponseHeaders: 00:00:00.000
ServerDoneResponse: 14:49:17.227
ClientBeginResponse: 14:49:22.390
ClientDoneResponse: 14:49:22.391

Overall Elapsed: 0:00:10.902


Actually, I have an application which have to place an order to server in a short period (rely on the existing connection pool of fiddler maintained). The lof of the above connection which is placing an order to server. However, I find that it has successfully placed duplicated orders at the end. I would l like to disable the auto retry feature in fiddler. (I would prefer to fail instead of duplicated order from my application.)

Just want to double check if I set Fiddler.CONFIG.RetryOnReceiveFailure = Fiddler.RetryMode.Never, this can avoid duplicated order.

Many thanks for your help.
Reply all
Reply to author
Forward
0 new messages