Skip to content

DefaultAsyncServerResponse.writeAsync() discards previously configured AsyncWebRequest timeoutΒ #37257

Closed

Description

@bclozel

See spring-projects/spring-graphql#1475 for background.

Calling DefaultAsyncServerResponse.writeAsync() unconditionally creates a new AsyncWebRequest and installs it on the WebAsyncManager, even when one is already present for the current request. The functional web framework can do such a thing when returning a ServerResponse.async(future) from a HandlerFunction; the HandlerFunctionAdapter does install an async web request already.

This means that the async timeout configured at the application level is ignored and instead we are falling back to the Servlet container default.

This was probably missed so far because the future backing the response could be already completed by the time writeAsync() runs. This becomes more visible in the case of GraphQL operations for long running operations (hence the virtual threads remark in the original issue).

Activity

  1. added this to the 7.0.10 milestone on Sep 8, 2026
  2. self-assigned this
    on Sep 8, 2026
  3. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    on Sep 8, 2026
  4. github-actions commented on Sep 8, 2026

    @github-actions
    Contributor

    Fixed via 3c6b001

  5. added 2 commits that reference this issue on Sep 8, 2026
    3c6b001
    bcd78a2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions