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

Random RequestError (ETIMEDOUT) without context #663

Open
aldochaconc opened this issue Aug 28, 2024 · 0 comments
Open

Random RequestError (ETIMEDOUT) without context #663

aldochaconc opened this issue Aug 28, 2024 · 0 comments

Comments

@aldochaconc
Copy link
Contributor

Hello, I'm receiving a RequestError (got) repeatedly from about one week ago.
I did debug using got library in order to check the real response from Shopify

Here is more context:

  • I'm using bullmq in order to handle timeouts and retries, I'm also using the config provided by the library (buckets, limits, etc). I'm allowing only one job concurrently, so it's very unlikely to be api limits.
  • The error happens even if nothing changes in the code
  • Happens with all endpoints
  • If I spam jobs, sometimes one is processed by the api, the rest fails

I really don't know where to point at.

Here's the stacktrace although it doesnt provide context or details,
Thanks in advance!

API stacktrace:

RequestError
    at ClientRequest.<anonymous> (/home/xxxxxx/Workspace/pyk-backend/node_modules/got/dist/source/core/index.js:970:111)
    at Object.onceWrapper (node:events:634:26)
    at ClientRequest.emit (node:events:531:35)
    at origin.emit (/home/crystal/Workspace/pyk-backend/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1117:18)
    at internalConnectMultiple (node:net:1185:5)
    at Timeout.internalConnectMultipleTimeout (node:net:1711:5)
    at listOnTimeout (node:internal/timers:575:11)
    at process.processTimers (node:internal/timers:514:7)
{
  "request": {
    "_events": {
      "pipe": [
        null,
        null
      ],
      "response": [
        null,
        null
      ]
    },
    "_readableState": {
      "highWaterMark": 0,
      "buffer": [],
      "bufferIndex": 0,
      "length": 0,
      "pipes": [],
      "awaitDrainWriters": null
    },
    "_writableState": {
      "highWaterMark": 0,
      "length": 0,
      "corked": 0,
      "writelen": 0,
      "bufferedIndex": 0,
      "pendingcb": 1
    },
    "allowHalfOpen": true,
    "requestInitialized": true,
    "redirects": [],
    "retryCount": 0,
    "_progressCallbacks": [],
    "_eventsCount": 8,
    "options": {
      "method": "GET",
      "retry": {
        "limit": 0,
        "methods": [
          "GET",
          "PUT",
          "HEAD",
          "DELETE",
          "OPTIONS",
          "TRACE"
        ],
        "statusCodes": [
          408,
          413,
          429,
          500,
          502,
          503,
          504,
          521,
          522,
          524
        ],
        "errorCodes": [
          "ETIMEDOUT",
          "ECONNRESET",
          "EADDRINUSE",
          "ECONNREFUSED",
          "EPIPE",
          "ENOTFOUND",
          "ENETUNREACH",
          "EAI_AGAIN"
        ],
        "maxRetryAfter": 12000
      },
      "headers": {
        "user-agent": "shopify-api-node/3.14.0",
        "x-shopify-access-token": "xxxxxx",
        "accept": "application/json",
        "accept-encoding": "gzip, deflate, br"
      },
      "hooks": {
        "afterResponse": [
          null
        ],
        "init": [],
        "beforeRequest": [],
        "beforeRedirect": [],
        "beforeError": [],
        "beforeRetry": []
      },
      "decompress": true,
      "throwHttpErrors": true,
      "followRedirect": true,
      "isStream": false,
      "responseType": "json",
      "resolveBodyOnly": false,
      "maxRedirects": 10,
      "prefixUrl": "",
      "methodRewriting": true,
      "ignoreInvalidCookies": false,
      "http2": false,
      "allowGetBody": false,
      "pagination": {
        "countLimit": null,
        "backoff": 0,
        "requestLimit": 10000,
        "stackAllItems": true
      },
      "cacheOptions": {},
      "pathname": "/admin/api/2024-07/orders.json",
      "hostname": "xxxxxx.myshopify.com",
      "protocol": "https:",
      "search": "?financial_status=any&fulfillment_status=any",
      "username": "",
      "password": "",
      "url": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
      "timeout": {
        "request": 12000
      }
    },
    "requestUrl": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
    "_cannotHaveBody": true,
    "_noPipe": true
  },
  "code": "ETIMEDOUT",
  "name": "RequestError",
  "options": {
    "method": "GET",
    "retry": {
      "limit": 0,
      "methods": [
        "GET",
        "PUT",
        "HEAD",
        "DELETE",
        "OPTIONS",
        "TRACE"
      ],
      "statusCodes": [
        408,
        413,
        429,
        500,
        502,
        503,
        504,
        521,
        522,
        524
      ],
      "errorCodes": [
        "ETIMEDOUT",
        "ECONNRESET",
        "EADDRINUSE",
        "ECONNREFUSED",
        "EPIPE",
        "ENOTFOUND",
        "ENETUNREACH",
        "EAI_AGAIN"
      ],
      "maxRetryAfter": 12000
    },
    "headers": {
      "user-agent": "shopify-api-node/3.14.0",
      "x-shopify-access-token": "xxxxxx",
      "accept": "application/json",
      "accept-encoding": "gzip, deflate, br"
    },
    "hooks": {
      "afterResponse": [
        null
      ],
      "init": [],
      "beforeRequest": [],
      "beforeRedirect": [],
      "beforeError": [],
      "beforeRetry": []
    },
    "decompress": true,
    "throwHttpErrors": true,
    "followRedirect": true,
    "isStream": false,
    "responseType": "json",
    "resolveBodyOnly": false,
    "maxRedirects": 10,
    "prefixUrl": "",
    "methodRewriting": true,
    "ignoreInvalidCookies": false,
    "http2": false,
    "allowGetBody": false,
    "pagination": {
      "countLimit": null,
      "backoff": 0,
      "requestLimit": 10000,
      "stackAllItems": true
    },
    "cacheOptions": {},
    "pathname": "/admin/api/2024-07/orders.json",
    "hostname": "xxxxxx.myshopify.com",
    "protocol": "https:",
    "search": "?financial_status=any&fulfillment_status=any",
    "username": "",
    "password": "",
    "url": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
    "timeout": {
      "request": 12000
    }
  },
  "timings": {
    "start": 1724868194745,
    "socket": 1724868194745,
    "lookup": 1724868195955,
    "error": 1724868196206,
    "phases": {
      "wait": 0,
      "dns": 1210,
      "total": 1461
    }
  },
  "payload": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant