Skip to content

Random and semi-persistent ETIMEOUT #817

Open
@myocytebd

Description

@myocytebd

I ran into a weird problem of keep getting the FetchError below.
(node v12.16.3 (latest LTS) on Windows 7 x64;fetch 2.6.0)
Apparently the stacktrace is async error delivery and useless.

FetchError: request to URL failed, failed, reason: connect ETIMEDOUT 184.27.17.100:80
at ClientRequest.<anonymous> (node_modules\node-fetch\lib\index.js:1455:11)
at ClientRequest.emit (events.js:310:20)
at Socket.socketErrorListener (_http_client.js:426:9)
at Socket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)

What I do is like send 20k GET to a server (for static resources) over ten minutes or so.
For each run there are 0-3 fetches went wrong as described below.
0. For every errored fetch, ETIMEOUT comes ~150ms after fetch -- looks weird to me.

  1. The errored URLs are persistent during each node run. (Same 20k request for each run)
    fetch same URLs after 5s, and the same FetchError comes during one node run.
  2. The errored URLs are random between each node run.
    Say, 1/20k went wrong in first run, and another 2/20k went wrong in second run.
  3. I didn't touch any network related configurations of node or fetch.

My questions:

  1. For ETIMEOUT that comes so fast, it is really timeout due to client configuration or it could be caused by server response?
  2. Any suggestions of where should I start to trouble shoot it? Is there some debug switch for node and fetch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions