Skip to content

Default timeout of HttpMessageInvoker via route configuration #1869

@RightDecision2

Description

@RightDecision2

Expected Behavior / New Feature

_defaultTimeout = TimeSpan.FromSeconds(_configuration.TimeOut);

Actual Behavior / Motivation for New Feature

_defaultTimeout = TimeSpan.FromSeconds(90);

In MessageInvokerPool:

public const int DefaultRequestTimeoutSeconds = 90;

and
// Adding timeout handler to the top of the chain.
// It's standard behavior to throw TimeoutException after the defined timeout (90 seconds by default)
var timeoutHandler = new TimeoutDelegatingHandler(downstreamRoute.QosOptions.TimeoutValue == 0
? TimeSpan.FromSeconds(RequestTimeoutSeconds)
: TimeSpan.FromMilliseconds(downstreamRoute.QosOptions.TimeoutValue))

in version 23.0

/// <summary>
/// TODO This should be configurable and available as global config parameter in ocelot.json.
/// </summary>
public const int DefaultRequestTimeoutSeconds = 90;

Specifications

  • Version: 23.0.0+
  • Platform: All
  • Subsystem: Any

Metadata

Metadata

Labels

ConfigurationOcelot feature: ConfigurationQoSOcelot feature: Quality of Service aka PollySpring'25Spring 2025 releasemergedIssue has been merged to dev and is waiting for the next releaseproposalProposal for a new functionality in Ocelot

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions