HS cli fetch gets "Error: ESOCKETTIMEDOUT" - rate limit reached?

Hello guys,

I am syncing files to and from a private GIT-repository in a script and fetching about 1000-1500 files. Since a few days ago I am getting regular “Error: ESOCKETTIMEDOUT” messages. @hubspot / hs-cli is updated to 4.0.1 99% of the files are synced, but 1-10 files get this error.

Issued call is:

hs fetch --overwrite / ./hubspot/ --use-env

Wrote file "/home/gitlab-runner/tmp/hubspot/XXX/templates/system/subscriptions-confirmation.html"
[ERROR] A Error has occurred. ESOCKETTIMEDOUT
[DEBUG] Error: Error: ESOCKETTIMEDOUT
 at ClientRequest.<anonymous> (/usr/local/lib/node_modules/@hubspot/cli/node_modules/request/request.js:816:19)
 at Object.onceWrapper (events.js:420:28)
 at ClientRequest.emit (events.js:314:20)
 at TLSSocket.emitRequestTimeout (_http_client.js:715:9)
 at Object.onceWrapper (events.js:420:28)
 at TLSSocket.emit (events.js:326:22)
 at TLSSocket.Socket._onTimeout (net.js:484:8)
 at listOnTimeout (internal/timers.js:554:17)
 at processTimers (internal/timers.js:497:7) {
 [stack]: 'Error: ESOCKETTIMEDOUT\n' +
 ' at ClientRequest.<anonymous> (/usr/local/lib/node_modules/@hubspot/cli/node_modules/request/request.js:816:19)\n' +
 ' at Object.onceWrapper (events.js:420:28)\n' +
 ' at ClientRequest.emit (events.js:314:20)\n' +
 ' at TLSSocket.emitRequestTimeout (_http_client.js:715:9)\n' +
 ' at Object.onceWrapper (events.js:420:28)\n' +
 ' at TLSSocket.emit (events.js:326:22)\n' +
 ' at TLSSocket.Socket._onTimeout (net.js:484:8)\n' +
 ' at listOnTimeout (internal/timers.js:554:17)\n' +
 ' at processTimers (internal/timers.js:497:7)',
 [message]: 'ESOCKETTIMEDOUT',
 code: 'ESOCKETTIMEDOUT',
 connect: false
}

Do you have any suggestions for fixing this ?

Tried fixes:

* Update to newest hs-cli (prev. 3.06)

* enable debug with -d (output see above)

* reduce available cpu (renice) reduce net-bandwidth (trickle)

Thanks for your tips & suggestions!

Hi, @SBeranek :waving_hand: Thanks for posting your question. Let’s see if we can get the conversation started — hey @nikodev @Teun @himanshurauthan have you, or your teams, ever dealt with this one?

Thanks! — Jaycee

Update on this topic:

If you experience this error or an error while syncing to your sandbox in the UI (screenshot) then the root cause is the same. hubspot is working on it.

Hello @SBeranek.,
ESOCKETTIMEDOUT -- rate limit reached indicates you have hit a hard limit on your account, and the request you made has been rejected.

“A rate limit is the number of API calls an app or user can make within a given time period”

It seems like, you have reached your request limit that’s why the error occured.

Regards,