GraphQL Query Timing out lambda

  • Goal: I have a GraphQl Resource Set up and it has worked for the last few months. I now ran across have a larger set of data i am trying to pull from. The API has a nextToken to be able to grab in sections but I can't even get the first section of data. I keep getting a timeout error. Of "Lambda: Unhandled....Task timed out after 6.02 seconds"

  • Steps: I have modified the query multiples times and still could not get it. I thought it might be on the other side "XOI" who I am requesting data from but then I ran it in postman and it worked fine. So I am assuming it is on the retool side? I have the timeout set to more on the advanced settings.

"[{"path":["getJobSummary"],"data":null,"errorType":"Lambda:Unhandled","errorInfo":null,"locations":[{"line":2,"column":3,"sourceName":null}],"message":"2025-01-24T01:36:17.869Z 3aaf9963-6844-41b6-aa1f-ea923eb9ca5a Task timed out after 6.02 seconds"}]"

I increased timeout to the max.
image

Anyone at retool have a solution or able to reproduce error?

Hello @PadenM,

That is an odd error given you increased the timeout to the max :thinking:

If you are self hosted, there may be other variables to increase the timeout limit. That is odd that it worked fine on postman. You may need to try batching the request in smaller chunks to stay within the query's time limit if we are not able to further increase this limit.

Hey @Jack_T I am not self hosted.
Not sure what else to do to get it fixed.

Do you have control over the server that you are querying with graphQL?

Was the postman query taking more than 6 seconds? Retools default timeout is two minutes so the query timing out this quickly makes me think that the server has a firewall or load balancer set up that is limiting the requests ability to complete :thinking:

OK, I adjusted my network settings in Postman to simulate a slower connection and was able to replicate the issue. Once the request exceeded 6 seconds, it failed as well. I will reach out to the API provider to discuss this further. Thanks!

1 Like

Great catch @PadenM!

Best of luck with the API, it looked like you had everything set up correctly :sweat_smile: