Skip to content
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

[Argus] HEAD assets & GET assets requests hang indefinitely if QN is unavailable #4771

Closed
zeeshanakram3 opened this issue May 23, 2023 · 2 comments
Assignees
Labels
argus Argus distributor node bug Something isn't working

Comments

@zeeshanakram3
Copy link
Contributor

zeeshanakram3 commented May 23, 2023

Issue

While investigating #4762 & #4760 I found that HEAD assets/{id} & GET assets/{id} requests to storage-node hang indefinitely if QN is unavailable AND asset does not exist in the local state

Argus logs the following unhandled exception on the console:

2023-05-23 15:12:26:1226 QueryNodeApi error: Error when trying to execute a query!
{
    "err": {
        "message": "request to http://graphql-server:8081/graphql failed, reason: getaddrinfo ENOTFOUND graphql-server",
        "networkError": {
            "message": "request to http://graphql-server:8081/graphql failed, reason: getaddrinfo ENOTFOUND graphql-server",
            "type": "system",
            "errno": "ENOTFOUND",
            "code": "ENOTFOUND"
        }
    }
}
(node:29) UnhandledPromiseRejectionWarning: Error: request to http://graphql-server:8081/graphql failed, reason: getaddrinfo ENOTFOUND graphql-server
    at new ApolloError (/joystream/node_modules/@apollo/client/errors/index.js:29:28)
    at /joystream/node_modules/@apollo/client/core/QueryManager.js:616:19
    at both (/joystream/node_modules/@apollo/client/utilities/observables/asyncMap.js:16:53)
    at /joystream/node_modules/@apollo/client/utilities/observables/asyncMap.js:9:72
    at new Promise (<anonymous>)
    at Object.then (/joystream/node_modules/@apollo/client/utilities/observables/asyncMap.js:9:24)
    at Object.error (/joystream/node_modules/@apollo/client/utilities/observables/asyncMap.js:17:49)
    at notifySubscription (/joystream/node_modules/zen-observable/lib/Observable.js:140:18)
    at onNotify (/joystream/node_modules/zen-observable/lib/Observable.js:179:3)
    at SubscriptionObserver.error (/joystream/node_modules/zen-observable/lib/Observable.js:240:7)
(node:29) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 46)

Expected Behavior

The requests should respond with error message & code instead of handing forever.

@zeeshanakram3 zeeshanakram3 added bug Something isn't working argus Argus distributor node labels May 23, 2023
@zeeshanakram3 zeeshanakram3 self-assigned this May 23, 2023
@kdembler
Copy link
Collaborator

@zeeshanakram3 are you aware whether this is still present in Subsquid based Argus?

@zeeshanakram3
Copy link
Contributor Author

@zeeshanakram3 are you aware whether this is still present in Subsquid based Argus?

Tested and this issue is not present in Subsquid based Argus node, so closing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argus Argus distributor node bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants