cube icon indicating copy to clipboard operation
cube copied to clipboard

Continue wait for GraphQL responses with http status code 500.

Open nitzien opened this issue 2 years ago • 3 comments

Describe the bug Continue wait error for GraphQL responses with http status code 500.

To Reproduce Steps to reproduce the behavior:

  1. Make a graphql query which would take more than 5 seconds (or reduce continueWait time configuration).

Expected behavior Though, we don't have this documented for graphql. for rest api it is documented to return with 200. Can we please have same http status code for graphql also. https://cube.dev/docs/http-api/rest/#prerequisites-continue-wait

Additional context From Slack thread- https://cube-js.slack.com/archives/C04NYBJP7RQ/p1684846190185819

@vasilev-alex

nitzien avatar May 24 '23 17:05 nitzien

It looks like this behavior is caused by the express-graphql library that is used by Cube to implement the GraphQL API: https://github.com/cube-js/cube/blob/b8de472b054f513732671e2211c4b2df1f811e99/packages/cubejs-api-gateway/src/gateway.ts#L230-L239

Unfortunately, this library is not maintained anymore. Probably, it should be replaced with a similar library first.

igorlukanin avatar Jan 08 '24 13:01 igorlukanin

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you. If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines. You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

github-actions[bot] avatar Jan 08 '24 13:01 github-actions[bot]

As a non-ideal workaround, I may suggest updating orchestrator_options (https://cube.dev/docs/reference/configuration/config#orchestrator_options) with a bigger continueWaitTimeout or, preferably, using pre-aggregations to speed up queries and eliminate "continue waits" completely.

igorlukanin avatar Jan 08 '24 13:01 igorlukanin