You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.
On linux I get a consistent 56-166MB heap size when restarting node, nothing interesting.
When using the jest re-run command the heap allocation starts to climb. This seems like a problem with Jest and not with the emulators
I looked into this for some time - it seems that Jest has a serious memory leak problem and there's no easy solution, see this issue open since 2019: jestjs/jest#7874
Some have suggested downgrading to Node 16.10 to mitigate the issue.
I'm not a Jest expert, but I spent some time following this heap dump debugging pathway:
I wasn't able to find a conclusive culprit - it may be within Jest. It LOOKS like the heap is filling up with strings (44MB and 62% heap allocation is in strings).
At any rate I don't think this is an issue we can/should solve within Firebase. Feel free to let me know if you disagree but I'm closing this one out for now.
[REQUIRED] Environment info
firebase-tools:
11.4.2
node --version:
v16.16.0
Platform:
MacOS Monterey 12.5, MacBook Pro Apple M1 Max, 64 GB
[REQUIRED] Test case
Repro: https://github.com/vojdan/firebase-memory-leak
Look at Issue 2 in README.md
https://github.com/vojdan/firebase-memory-leak#issue-2---memory-leak
[REQUIRED] Steps to reproduce
GIF included in README
https://github.com/vojdan/firebase-memory-leak#issue-2---memory-leak
Start firebase emulators (in terminal 1)
npm run emulators:test
Run tests in watch mode (in terminal 2)
npm run test:memleak
[REQUIRED] Expected behavior
Heap memory will stay low. Note: memory stays low when running
npm run test:watch
[REQUIRED] Actual behavior
Heap memory increases on every re-run and eventually crashes. Press
Enter
interminal 2
after test run finishes to re-run.The text was updated successfully, but these errors were encountered: