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
Memory Leak when Handling 502 Errors #3179
Comments
Can you give full codes of |
@chinesedfan Thank you for taking a look. Also -- d'oh -- my apologies. I appear to have copy and pasted the wrong program into my ticket description. I have pasted the actual reproduction into the description, and I will include it below as well.
This program isolates the problem so that axios is the only third party library in use. |
@chinesedfan were you able to reproduce with the above program, or are you not seeing the problem we're seeing? Is there anything we can do to help move this along? |
I have a question about the example first, why you need |
@chinesedfan If we comment out the axios line the memory will not keep growing, it stabilizes. We're using Is there's a better way for us to demonstrate the memory leak for you? Please let us know and we'll be happy to assist. |
Seeing this as well, would love to see an update :) |
@chinesedfan any updates on this or anything @sammccord and I could do to help move this along? |
Sorry, I don't have much experiences about memory leaking. There are some similar issues in our issue list. Hope the community can find out the reason with an easy understanding report. |
Thank you @chinesedfan -- so if I understand you correctly in addition to seeing the behavior reproduced, you'll need someone that can actually get into the axios internals and describe what's going on that leads to the leak. @sammccord -- is that the sort of thing you might be up for? |
Hello! 👋 This issue is being automatically marked as stale because it has not been updated in a while. Please confirm that the issue is still present and reproducible. If no updates or new comments are received the issue will be closed in a few days. Thanks. |
Still present, still reproducible with the steps listed above. |
Hey, guys, I saw there has been recent updates on this issue (@astorm said it is still reproducible), I'd like to work on this. Is anyone else already tackling this problem? |
@pgcalixto Sure. Feel free to take it, as well as any other issues of axios. This repository requires help from the community urgently. |
Please check if this has been fixed with #3694 |
Happy to check @jasonsaayman -- is that fix in a release yet? If not is there a canonical way to run |
@astormnewrelic it seems that the error actually has to do with the follow-redirects package so the issue persists. To answer your question you can do the following |
Describe the bug
We've discovered what appears to be a memory leak in axios when handling HTTP requests that result in a 502 error.
To Reproduce
Run this small program in a terminal window (sets up an endpoint to call)
Run the program whose source is provided below
Monitor memory usage of the node process from program Support file uploads #2
Expected Behavior: Memory usage stays constant
Actual Behavior: Memory use slowly grows over time
Expected behavior
We expect the memory use of the node process should stay consistent and not grow
Environment
Additional context/Screenshots
We maintain New Relic's NodeJS agent. We had a custom come to us reporting a memory leak in the Node Agent, with a reproduction here. Like a lot of the leaks reported to us, this appears to be a case of a small leak in an upstream package (
axois
) being made much worse by the steps the New Relic's Node Agent needs to take in order to instrument it's thing.The text was updated successfully, but these errors were encountered: