Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

ActivityTimeout (default 100s) silently limits route-level Timeout values, causing confusion when configuring timeouts longer than 100 seconds.

Changes

  • Added "Interaction with ActivityTimeout" section explaining how both timeouts apply simultaneously
  • Documented precedence behavior: for idle requests, the lower timeout triggers first; for active requests, route-level Timeout governs total duration
  • Clarified ActivityTimeout reset conditions: resets on response headers, data I/O, WebSocket pings (but not TCP keep-alives or HTTP/2 pings)
  • Added debugging caveat: route Timeout disabled when debugger attached, ActivityTimeout always applies
  • Included configuration example for adjusting ActivityTimeout per cluster
  • Clarified WebSocket behavior: documented that ActivityTimeout applies to WebSocket requests and that WebSocket keep-alives can prevent idle timeouts

Example

{
  "Routes": {
    "longRunning": {
      "ClusterId": "cluster1",
      "Timeout": "00:05:00"  // 300s - will be limited by ActivityTimeout's 100s default
    }
  },
  "Clusters": {
    "cluster1": {
      "HttpRequest": {
        "ActivityTimeout": "00:10:00"  // Increase to 600s to honor route timeout
      }
    }
  }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>YARP timeout docs should mention HttpClient ActivityTimeout</issue_title>
<issue_description>
In the current docs about YARP Timeouts, there’s no mention of ActivityTimeout.

This is confusing because ActivityTimeout has a default of 100 seconds, which silently overrides route-level Timeout values longer than that.

For example:

  • If you configure a route Timeout of 300 seconds, it will be ignored because the request is still canceled after the default ActivityTimeout of 100s.
  • But if you configure a route Timeout of 1 second, it does take effect.

This behavior can make debugging really painful, since developers may think their configured Timeout is being honored when in reality it’s capped by ActivityTimeout, it drove us insane this morning :)

The docs should explicitly call out the interaction between Timeout and ActivityTimeout, and clarify which one takes precedence in different scenarios.
</issue_description>

Comments on the Issue (you are @copilot in this section)

@MihaZupan Thanks for raising the issue, yes, improving docs here makes sense.

The behavior is that both will apply.
ActivityTimeout is just refreshing its timer if something's still happening with the request. If the request is seemingly idle, then effectively whichever one is lower applies.

For debugging, note that the regular Timeouts feature does not apply when you have a debugger attached.
ActivityTimeout makes no such distinction though, it's always set.</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Internal previews

📄 File 🔗 Preview link
aspnetcore/fundamentals/servers/yarp/timeouts.md aspnetcore/fundamentals/servers/yarp/timeouts

Copilot AI changed the title [WIP] Update YARP timeout docs to include ActivityTimeout information Document ActivityTimeout interaction with route-level Timeout in YARP Nov 1, 2025
Copilot AI requested a review from MihaZupan November 1, 2025 05:34
Copilot finished work on behalf of MihaZupan November 1, 2025 05:34
Copilot AI requested a review from MihaZupan November 1, 2025 05:43
Copilot finished work on behalf of MihaZupan November 1, 2025 05:43
@MihaZupan MihaZupan marked this pull request as ready for review November 1, 2025 06:00
@guardrex guardrex requested a review from wadepickett November 1, 2025 11:32
Copy link
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @MihaZupan. I cannot find any issues. Great update. Thanks!!

@wadepickett wadepickett merged commit 748aa64 into main Nov 3, 2025
5 checks passed
@wadepickett wadepickett deleted the copilot/update-yarp-timeout-docs branch November 3, 2025 16:42
@wadepickett
Copy link
Contributor

wadepickett commented Nov 3, 2025

fixes #36294 (Added tracking doc issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YARP timeout docs should mention HttpClient ActivityTimeout

3 participants