You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just switched from Node 18 to Node 20 and i'm currently encountering a problem with a microservice deployed that does some multiple calls to another one using graphql-request. First call is working well but the other call raise the following error
Fetch something: request to http://myurl.svc.cluster.local:3002/internal-graphql failed, reason: socket hang up
After some search it seems on node 20 and node 22 the default keep-alive value in createServer has been changed from false to true. It seems it cause error in graphql-request as the previous connection is not closed so we encounter the 'socket hang up' error.
I'm using graphql-request@6.1.0. Was not able yet to update to the last version due to esm compilation issues in typescript.
This error appears only when the microservice is deployed. In local all is working fine. I have fixed in another project by setting back the keep-alive option in createServer to false but for this particular it seems to have no effect.
Did someone encountered this issue and has a workaround?
This discussion was converted from issue #1057 on September 03, 2024 13:52.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I've just switched from Node 18 to Node 20 and i'm currently encountering a problem with a microservice deployed that does some multiple calls to another one using graphql-request. First call is working well but the other call raise the following error
Fetch something: request to http://myurl.svc.cluster.local:3002/internal-graphql failed, reason: socket hang up
After some search it seems on node 20 and node 22 the default keep-alive value in createServer has been changed from false to true. It seems it cause error in graphql-request as the previous connection is not closed so we encounter the 'socket hang up' error.
I'm using graphql-request@6.1.0. Was not able yet to update to the last version due to esm compilation issues in typescript.
This error appears only when the microservice is deployed. In local all is working fine. I have fixed in another project by setting back the keep-alive option in createServer to false but for this particular it seems to have no effect.
Did someone encountered this issue and has a workaround?
Related Links
node-fetch issue
axios issue
socket hang up error
Beta Was this translation helpful? Give feedback.
All reactions