Re: Fiddler HTTP 504

4,334 views
Skip to first unread message

EricLaw

unread,
Oct 18, 2012, 2:15:34 PM10/18/12
to httpf...@googlegroups.com
Fiddler should be timing out at some point if the server fails to return any content.
 

This value is controlled by the preference: fiddler.network.timeouts.serverpipe.receive.initial

By default, its value is -1, which means it relies on .NET/Windows to use whatever timeout it uses for "infinite".

You can set a specific value by providing a number of milliseconds (e.g. 60000 for one minute).

 
Fiddler-generated errors do not flow through OnBeforeResponse; they instead flow through any OnBeforeReturningError handler.
 
Current versions of FiddlerScript include the following block which you can uncomment as needed:
 

/*

// This function executes just before Fiddler returns an error that it has
// itself generated (e.g. "DNS Lookup failure") to the client application.
// These responses will not run through the OnBeforeResponse function above.
static function OnReturningError(oSession: Session) {
}
*/

 

 
 
 

On Thursday, October 18, 2012 4:21:24 AM UTC-5, Pete wrote:
I'm running Fiddler to watch some traffic and from time to time I get 504 from Fiddler.
The response has following header:

=============================================================================== 
HTTP/1.1 504 Fiddler - Receive Failure
Content-Type: text/html; charset=UTF-8
Connection: close
Timestamp: 10:08:36.697

[Fiddler] ReadResponse() failed: The server did not return a response for this request.
=============================================================================== 

This seems to happen randomly, the session has a "green down arrow" icon which according to Fiddler's website indicates "Response is being read from the server" and after 5 mintues or 5 minutes and some seconds it turns to 504 and returns the headers shown above.

As I understand it the problem is that the remote server did not return a response in 5 minutes which seems to be some sort of a hardcoded timeout in Fiddler.

However what bugs me most is that I can't handle this situation in OnBeforeResponse where I have following code:
...
if (oSession.responseCode == 504) {
  MessageBox.Show("Got 504");
}

It seems like with 504 OnBeforeResponse is skipped.

If you have any ideas on how to track down the cause of this 504 and maybe do a reply when they happen I'd be really grateful.

Cheers,
Pete

.

Pete

unread,
Oct 18, 2012, 3:39:05 PM10/18/12
to httpf...@googlegroups.com
Thanks! Great answer and so quickly! It actually explains everything.
I have my CustomerRules.js customized so that's probably why it doesn't get updated (II could not find OnReturningError and added it manually).
BTW. I'm just scratching the surface with Fiddler now so I'm planning to buy your book (have seen your conference talks so far, very helpfull).

Thank,
Peter

PS. Thanks for Fiddler, it's awesome!

EricLaw

unread,
Oct 18, 2012, 4:43:45 PM10/18/12
to httpf...@googlegroups.com
Thanks, Pete!
 
Fiddler doesn't overwrite CustomRules.js on upgrades to avoid messing up any custom settings. You can see the "latest" version by looking at %Program Files%\fiddler2\scripts\SampleRules.js. This file is copied over to CustomRules.js if the latter file ever is deleted.
 
-Eric

Terri Schlotterbeck

unread,
Sep 21, 2014, 11:00:22 PM9/21/14
to httpf...@googlegroups.com
Can you please explain how to fix this? I know very little about computers, so your response will have to be for your typical lay person. I am so frustrated at this point with computer issues, I'm ready to throw it across the room :) I had problems with my wifi that we finally figured out. Now I get the.. [Fiddler] ReadResponse() failed: The server did not return a response for this request.  for most websites, yet I am able to access my email and facebook just fine. Thanks for any help! Terri

EricLaw

unread,
Sep 22, 2014, 4:27:19 PM9/22/14
to httpf...@googlegroups.com
Terri-- Unfortunately, your question is very ambiguous. Fiddler is a tool for web and software developers; if you're not using either of these, you don't need to use Fiddler.

If you're not deliberately using Fiddler, then something else is going on; please explain what exactly you're doing.
Reply all
Reply to author
Forward
0 new messages