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

[2.16.1 -> 2.17.0] graphql codegen container gets rejected (ECONNRESET) #9393

Open
Zerebokep opened this issue Jan 21, 2023 · 8 comments
Open
Labels
k/bug Something isn't working t/gql-services

Comments

@Zerebokep
Copy link

Was there any undocumented change regarding connection limits in the 2.17.0 update?

After the update my graphql codegen container instance receives the following error every time I'm generating my graphql code:

FetchError: request to http://hasura:8080/v1/graphql failed, reason: socket hang up

                        reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
          ^
FetchError: request to http://hasura:8080/v1/graphql failed, reason: socket hang up
    at ClientRequest.<anonymous> (/redacted/redacted/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at ClientRequest.emit (node:domain:489:12)
    at Socket.socketOnEnd (node:_http_client:514:9)
    at Socket.emit (node:events:525:35)
    at Socket.emit (node:domain:489:12)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}
error Command failed with exit code 1.
@Zerebokep Zerebokep added the k/bug Something isn't working label Jan 21, 2023
@ajohnson1200
Copy link

There were no changes to connection limits in 2.17. Happy to check this out in more detail / try to reproduce if you could provide some additional detail on how / where you're seeing this.

@Zerebokep
Copy link
Author

I'll try to share more details asap. So far I've figured out that hasura closes the connection if too much requests happen in a short timeframe, it works fine if I add a 1 second sleep between the requests.

Strangely everything works (even without the 1 second sleep) if I route the requests through my reverse proxy (caddy) instead directly between my two docker containers (hasura & graphql codegen).

#9400 might be related?

@goof03
Copy link

goof03 commented Feb 6, 2023

Hi!
we have same problem here after an upgrade 16.1 -> 17.1 we cant login anymore…
nodejs api (grapql-request) make :

FetchError: request to http://xx…xx/v1/graphql failed, reason: socket hang up

it's a connection between two pods in a k3s kubernetes cluster.

Downgrading to 16.1 solve the problem

Perhaps a clue, in my team more you computer is powerfull more you can launch request before error …

@motopods
Copy link

motopods commented Feb 9, 2023

Downgrading to 16.1 solve the problem, too.
An error occurs if there is no delay between two requests.

@AndRud
Copy link

AndRud commented May 12, 2023

I have the same issue when upgrading from 2.16.1 to 2.17.0 or later.

@YuriyKabanenko
Copy link

I have the same problem.
For actions it works fine unlike event triggers

@goof03
Copy link

goof03 commented Sep 7, 2023

Downgrading node version solve the problem there is a bug in a sub package of graphql lib. I don't remember exacly and i havent check recently if it's fix … sorry

@vitaliytv
Copy link
Contributor

switch from node 20 to node 21 - helped for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/bug Something isn't working t/gql-services
Projects
None yet
Development

No branches or pull requests

8 participants