-
Notifications
You must be signed in to change notification settings - Fork 900
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 in firestore().doc().set() #2372
Comments
Thank you for taking time filling this issue. This may have seem to be related to issue googleapis/nodejs-firestore#768. I'll file a report and confirm this internally. |
Thanks for the report. This isn't too surprising. Firebase uses various singleton instances, etc. to track state. I can actually reproduce the leak reported by jest with just:
If you're running into a specific issue with unbounded memory usage we can look into it, but we don't provide any guarantees about cleaning up all traces of the SDK when it comes to memory usage. Can I ask how important this is to you and what your overall goal is? We would likely accept (noninvasive) PRs to clean up memory usage but beyond that I'm not sure if/when we'd be able to invest much time into this. Thanks! |
@mikelehen @zeevl my team actually is running into this issue Started looking at why our Jest tests was running out of memory even for very easy test (I saw a high heap usage like 900MB for a simple hello world) Are there or has there been any plans to address this? It's not blocking or anything but definitely worrisome as it's making some of our Jest test suite unstable |
@melliu My sincere apologies for sitting on your issue report for so long. Based on the code snippet you provided, it looks like you are using the Admin SDK (not the Web SDK). If that is the case then the correct repository for this issue is https://github.com/googleapis/nodejs-firestore. I'd be happy to log this issue there on your behalf if you'd like. In order to do that it would be helpful (but not required) to get some additional information from you:
Thank you for your time and sorry again for not responding sooner. |
@MaximeHeckel Please accept my sincere apologies for taking so long to reply to your comment. As mentioned in an earlier comment, we do not promise to clean up every single object when calling |
hey @dconeybe , no worries, I went around the issue and decided to manually mock any firestore/firebase dependent call or functions. This reduced our memory leakage enough to make our unit tests running again |
Thanks for the response, @MaximeHeckel. From what I can tell, the only action remaining for the Firestore dev team is to potentially open up a similar ticket in the nodejs-firestore repository on behalf of @melliu. As a result, I've added the "needs-info" tag, which will automatically close this issue if there are no more responses. |
Hey @zeevl. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @zeevl if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
jest --detect-leaks
reports memory leaks withfirestore().doc().set()
Steps to reproduce:
Expected: success
Result: memory leaks detected
The text was updated successfully, but these errors were encountered: