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

May memory leak in 0.24.0. #4451

Closed
pingfengafei opened this issue Feb 8, 2022 · 3 comments
Closed

May memory leak in 0.24.0. #4451

pingfengafei opened this issue Feb 8, 2022 · 3 comments

Comments

@pingfengafei
Copy link

pingfengafei commented Feb 8, 2022

Describe the bug

I've write a tool which uploads large (may more than 10GB) and multiple files to AWS S3 in browser, and met memory leak.
Each http request put chunk at 5MB and the ArrayBuffer should GC. however:

First with 0.21.4, memory always leak and there is an issue: #3694, and then updated to 0.24.0. after that, local env (macbook pro) works well but My QA env has a quite strange behavior.

First step, Every time upload success.
Second: Upload failed with memory leak in much chance, and upload success in a few chance.
Third: the Second reversed.

I can not reproduce this behavior in my local, anyone met the same issue?

besides, the #3694 related issue fixes follow-directs error, but it is used in Node, why effect browser?

Environment

  • Axios Version [0.24.0]
  • Adapter [HTTP]
  • Browser [Chrome, Safari, Firefox]
  • Browser Version [may latest or newly version]
  • OS: [11.6.1]
@ebilling
Copy link

ebilling commented Mar 9, 2022

Seeing the same issue. We are doing POST requests every 10 seconds and it looks like the request body is not being released. We have isolated it down to nothing but the HTTP POST through axios.

@julian-becker
Copy link

julian-becker commented Mar 21, 2022

I'm also observing a memory ramp up when issuing subsequent POST requests to different URLs. I boiled the issue down to the following problematic code:
image

The memory just keeps ramping up... After no more POST requests are issued, the memory is released at some point, but it may take up to 10 minutes for it to take effect.

When all POSTS are issued to the same URL (fix run and i in the above code to constant values), the issue disappears.

I'm observing this on React-Native v0.64.3 and axios v0.25.0.

This is the ramp-up I observe:
image

When POSTing to the same URL repeatedly, the ramp up (mostly) disappears:
image

@jasonsaayman
Copy link
Member

Hi 👋

Please could you retry with the latest version and open a new issue should this error still be relevant?

Thanks

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

4 participants