-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed as not planned
Closed as not planned
Copy link
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
When using spring-boot-starter-graphql with spring-boot-starter-web and @EnableAsync I would expect it to honor the spring.mvc.async.request-timeout property. Instead it is throwing a AsyncRequestTimeoutException after 30 seconds.
Steps to Reproduce
- Create a project with
spring-boot-starter-webandspring-boot-starter-graphql - Add
@EnableAsync - Add Property
spring.mvc.async.request-timeout=50s - Add
QueryMappingmethod that sleeps.
@QueryMapping
@Async
public CompletableFuture<Book> bookById(@Argument String id) {
return CompletableFuture.supplyAsync(() -> {
try {
LOGGER.info("Starting Sleep");
TimeUnit.SECONDS.sleep(45);
return Book.getById(id);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
});
}- Send Request and observe error
.w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.context.request.async.AsyncRequestTimeoutException]
I observed this behavior using Spring Boot 3.3.5
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue