Increase response timeout for remote schemas
See original GitHub issueWe currently use the hasura graphql-engine with a custom remote schema that implements certain special graphql mutations. Some of these mutations can run longer than 30 seconds, which seems to be the default http request timeout of hasura. After the 30 seconds we receive the following error:
{
"errors": [
{
"extensions": {
"path": "$",
"code": "unexpected"
},
"message": "HttpExceptionRequest Request {\n host = \"our-host\"\n port = 80\n secure = False\n requestHeaders = [(\"Content-Type\",\"application/json\"),(\"User-Agent\",\"hasura-graphql-engine/v1.0.0-beta.2\"),(\"x-hasura-role\",\"admin\")]\n path = \"/graphql\"\n queryString = \"\"\n method = \"POST\"\n proxy = Nothing\n rawBody = False\n redirectCount = 10\n responseTimeout = ResponseTimeoutDefault\n requestVersion = HTTP/1.1\n}\n ResponseTimeout"
}
]
}
It would be nice if the response timeout for remote schemas would be configurable or at least could be increased to something higher than 30 seconds, which seems pretty short to us.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Timeouts | Hasura GraphQL Advanced Tutorial
Database timeout: In case a database connection or a query takes a long time to respond, Hasura can return a timeout error. There's...
Read more >Configure the remote query timeout Server Configuration Option
The remote query timeout option specifies how long, in seconds, a remote operation can take before SQL Server times out. The default value ......
Read more >API Reference: ApolloServer - Apollo GraphQL Docs
This article documents the ApolloServer class from the @apollo/server package. You can use the ApolloServer class to create an instance of Apollo Server ......
Read more >Request timeouts on Bravo
Then, another request is sent to the corresponding remote API, which is responsible for building the HTTP response. The communication schema for the...
Read more >GraphQL query timeout and complexity management - Medium
In short, request size limit and request timeout settings are necessary, ... datastores and remote procedure calls is executed from here.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@FabianKramm Here is the PR for this feature: https://github.com/hasura/graphql-engine/pull/2740
Hi @FabianKramm
I have marked this as a feature and we’ll take it up in the upcoming releases.
However, you can also make the long-running mutations as background jobs and use event triggers to trigger the jobs. That way your mutation will return immediately. But you do have to architect your entire app around that pattern.