Skip to content

FetchError: request to http://0.0.0.0:8000/graphql failed, reason: socket hang up #4414

Description

@IgnisDa

What version of Remix are you using?

1.7.3

Steps to Reproduce

I have a graphql server. Making a single request to it in loader or action works fine. But if I have multiple requests:

await graphqlSdk().getStuff();
await graphqlSdk().getStuff();

it fails with the following error:

FetchError: request to http://0.0.0.0:8000/graphql failed, reason: socket hang up
    at ClientRequest.<anonymous> (/workspace/node_modules/.pnpm/@remix-run+web-fetch@4.3.1/node_modules/@remix-run/web-fetch/src/fetch.js:111:11)
    at ClientRequest.emit (node:events:513:28)
    at Socket.socketOnEnd (node:_http_client:512:9)
    at Socket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  erroredSysCall: undefined
}

Expected Behavior

The requests should succeed and my backend should receive 2 requests.

Actual Behavior

The first request succeeds but the second one does not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions