question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Increase response timeout for remote schemas

See original GitHub issue

We 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tirumaraiselvancommented, Aug 16, 2019
2reactions
ecthiendercommented, Jul 16, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found