-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL Starter With Starter Web Not Honoring Async Request Timeout #43076
Comments
Thanks for raising this and providing a sample. This has been implemented in #42966 and I'm afraid we cannot backport it to a previous generation. |
@bclozel the pull request you linked seems to be specific to an SSE request timeout so I would not expect that to address this issue, since the sample being used is not using GraphQL over SSE |
Sorry about that. I think this is expected as query mappings don't align one to one with HTTP requests and in general GraphQL is transport agnostic. If you wish to apply async behavior at the query level you can use one of the return types that involves async behavior. See https://docs.spring.io/spring-graphql/reference/controllers.html#controllers.schema-mapping.return.values If you would like to discuss this further please create an issue in the spring-graphql project. |
@bclozel no worries! I spent some time in the debugger to try and get a better understanding on this and realized it was a async timeout from tomcat. Adding this to the sample fixes the problem.
Thanks! |
When using
spring-boot-starter-graphql
withspring-boot-starter-web
and@EnableAsync
I would expect it to honor thespring.mvc.async.request-timeout
property. Instead it is throwing aAsyncRequestTimeoutException
after 30 seconds.Steps to Reproduce
spring-boot-starter-web
andspring-boot-starter-graphql
@EnableAsync
spring.mvc.async.request-timeout=50s
QueryMapping
method that sleeps..w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.context.request.async.AsyncRequestTimeoutException]
I observed this behavior using Spring Boot 3.3.5
The text was updated successfully, but these errors were encountered: