-
I set QoSOptions TimeoutValue 60s: "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 3,
"DurationOfBreak": 5,
"TimeoutValue": 60000
} And my response complete with 33.78s, but web client catch “gateway timeout”,this is ocelot log:
I think this is |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@SamYuann I don't get your question. Just clarify I understood can you explain: If its by gateway call, and response returns then Ocelot is fine, check with webclient and next thing you are trying to do with. Exactly I don't remember solution for your problem but few years ago I have seen this problem in another project (Not in Ocelot), Probably something wrong with http or https scheme. I need explanation again to understand problem, I haven't seen these things with latest Ocelot version and I have done testings over it. Are you still using Ocelot? @SamYuann |
Beta Was this translation helpful? Give feedback.
-
@ks1990cn Conclusion: |
Beta Was this translation helpful? Give feedback.
-
Sam, welcome to Ocelot world!
Why do you think so? I don't see any problems at all! Your request was finished in 34.134 seconds with successful status code
And if QoS value is defined then it is used instead of default 90 secs value: var timeout = downstreamRoute.QosOptions.TimeoutValue == 0
? _defaultTimeout
: TimeSpan.FromMilliseconds(downstreamRoute.QosOptions.TimeoutValue); See the Time out logic code here
The link: code: // This is hardcoded at the moment but can easily be added to configuration
// if required by a user request.
_defaultTimeout = TimeSpan.FromSeconds(90); Are there any other problems we can help you with? 🤣 |
Beta Was this translation helpful? Give feedback.
Sam, welcome to Ocelot world!
Why do you think so? I don't see any problems at all! Your request was finished in 34.134 seconds with successful status code
200
akaOK
. What's the problem, my dear? 😉So, QoS Timeout policy wasn't applied (34 is less than 60). 😄
And default
HttpClient
timeout is 90 secs:_defaultTimeout = TimeSpan.FromSeconds(90);
And if QoS value is defined then it is used instead of default 90 secs value: