Skip to content

[BUG] HTTP long-polling gateways can be marked offline during a healthy poll #7693

Closed

Description

@Aias00

Current behavior

Admin considers an instance offline after 20 seconds without a report. HTTP synchronization reports instance presence at the start of HttpLongPollingDataChangedListener.doLongPolling, then may hold the request for 60 seconds (HttpConstants.SERVER_MAX_HOLD_TIMEOUT). The independent HeartbeatListenerConfiguration is disabled when HTTP sync is configured. With no configuration changes, a healthy long-polling gateway can therefore exceed the instance timeout before the next report. Full deployment reproduction is still required.

Additional evidence: shenyu-admin/.../listener/http/HttpLongPollingDataChangedListener.java:141-171, shenyu-common/.../constant/HttpConstants.java:37, and the heartbeat starter condition.

Acceptance criteria

  • Deterministically reproduce a healthy unchanged poll crossing the 20-second timeout.
  • Align reporting cadence and liveness timeout, or track active polls with an explicit bounded expiry; a stuck request must not imply unlimited health.
  • Test unchanged/config-changed polls, disconnected clients, stalled peers and recovery.
  • Document failure-detection delay and preserve WebSocket/independent-heartbeat behavior.
  • Do not solve this by disabling offline detection or adding duplicate reporting loops without ownership.

Source evidence

Reviewed source. Baseline: b4e115367fd57adc8aba332d655b1009932ba394. Report based on source inspection; no runtime reproduction was executed during issue preparation.

Activity

  1. added
    type: bug
    on Oct 17, 2026
  2. DrDread746 commented on Oct 17, 2026

    @DrDread746
    Contributor

    /assign

  3. DrDread746 commented on Oct 17, 2026

    @DrDread746
    Contributor

    Hello, I have resolved this issue. HttpLongPollingDataChangedListener now schedules periodic liveness refreshes on its managed executor during held requests, along with AsyncListener disconnect cleanup to prevent false offline timeouts. I am opening a PR shortly.

  4. added 8 commits that reference this issue on Oct 18, 2026
  5. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

admintype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions