You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Are you scheduling the new request on the res.on('close', event? It might be worth printing something when the socket closes, just so you can be sure that you don't have two connections going at the same time.

    You could also try printing process.memory().usage before each request to get an idea of memory usage. It's possible that your code is actually allocating memory each time it runs, so eventually there just isn't enough memory to make the HTTPS connection.

About

Avatar for Gordon @Gordon started