ECONNRESET when sending many requests from node.js sdk from Heroku

Hi!
Every day our cron for syncing organizations and their deals stops because of ECONNRESET.
I think that the problem can be because https://github.com/pipedrive/client-nodejs does not have a possibility to set keepAlive and for every connection it establishes a new connection that is not efficient when there are many requests as in my case.
I bumped into similar case in AWS sdk https://github.com/awsdocs/aws-javascript-developer-guide-v2/pull/20/files

Is anybody bumped into similar cases?
I would be grateful if you could help :slight_smile:

Hi @Mykhailo_Koval

I’m checking with our team on what might be the issue.

Hey. If you experience ECONNRESET, please contact support so that we could try and trace your requests.

Regarding library, I’m not so in-depth into networking level & not familiar with keep-alive headers, but looking at HTTP doc, seems that 2.0 (that we mainly rely on web servers), does not support keep-alive headers.

Hard to say why exactly this happens, as this can happen in different layers…

  • your network getting disconnects
  • CDN
  • our routing & ratelimiting layers
  • actual microservices / DB responsible for data/logic

So far, with distributed tracing that we use, I was unable to see it on routing/microservices levels.

If you are able to reproduce this issue on consistent basis with a proof (like a script + api token) that we can use to debug it, that would help significantly.

1 Like

Hi! Thanks for response :slight_smile:

If you experience ECONNRESET, please contact support so that we could try and trace your requests.
Already contacted, they told that did not find anything and recommended to write a topic on devcommunity.pipedrive.com

seems that 2.0 (that we mainly rely on web servers)
well, Usage Statistics of HTTP/2 for Websites, February 2024 says that about 44% websites use http2, but i think keepAlive option is still actual because many http2 websites are actually http1 websites using cloudflare or other proxy servers to get ssl and http2. However these proxies are skipped during requests from actual api service.

Hard to say why exactly this happens, as this can happen in different layers
Totally agree…

If you are able to reproduce this issue on consistent basis with a proof (like a script + api token) that we can use to debug it, that would help significantly.
yes, i’m able, i shared both logs and script with pipedrive support, they did not find anything and redirected me here.

well, will try to talk to Heroku support to be sure that there are no issues on networking level

Issue appeared with big event loop latency because of lodash differenceWidth on a big array.

1 Like