Skip to content

[BUG] Exponential/Fixed retry strategies: outer timeout neuters configured retry count #6583

Closed

Description

@Aias00

Description

The response Mono passed in is already wrapped with .timeout(duration) in AbstractHttpClientPlugin (per-attempt timeout). Then the retry strategy wraps the ENTIRE retry chain in another .timeout(duration). With duration=3s and Retry.fixedDelay(3, Duration.ofSeconds(2)), the outer 3s timeout fires before the 2s delay completes, so an operator configuring retryTimes=3 actually gets at most 1 retry. (Counterpart: DefaultRetryStrategy "current" mode has NO outer timeout on the retry chain, so with retryTimes=5 and maxBackoff=20s a dead-upstream request can occupy a connection for up to ~115s — slow-death amplification.)

Location

shenyu-plugin-httpclient/.../ExponentialRetryBackoffStrategy.java:53-54
FixedRetryStrategy.java:52-53

Impact

Configured retry counts are silently ineffective (Exponential/Fixed), or unbounded connection occupation (Default "current").

Suggested fix

Use a separate, longer timeout for the retry chain (e.g. duration * (retryTimes + 1) + backoff), or remove the inner per-attempt timeout and let the chain's outer timeout be the sole bound. Add an outer deadline to the DefaultRetryStrategy "current" mode.

Related existing issue(s)

None

Identified during the 2026-08-02 audit; full list in docs/issue-candidates-2026-08-02.md.

Activity

  1. github-actions commented on Aug 2, 2026

    @github-actions
    Contributor

    👋 Hello @yuluo-yx

    A new issue has been opened by @Aias00:

    Please review when you have time. Thank you! 🙏

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions