Skip to content

Memory leak with https #791

@philippevk

Description

@philippevk

Hi,

it seems there is a slow memory leak with https urls. Consider the following script:

#!/usr/bin/env node
const axios = require('axios');
function pingUrl(url) {
  axios.get(url).then(res => { console.log(res.status); });
  setTimeout(pingUrl.bind(null, url), 1000);
}
pingUrl(process.argv[2]);

I ran two instances of the script in parallel, one with with an http url, the other with the same url in https.
After 20 hours, the https process uses 10% of my 16GB memory, compared to 0.1% for the http process.

We discovered this issue since we use axios as part of a home made monitoring tool. The tool pings urls at regular interval and we are having memory issues after a while.

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