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
Importing data via emulator UI causes massive memory usage #2277
Comments
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. |
Also, I do have debug logs, but would rather not post them here, but I'd be glad to share them in some slightly more secure method. |
@nikmartin thanks for filing this! I believe you also posted this on Twitter, so I recognize the issue. There are two things we can do here:
|
Yes, I was having trouble finding where to report it, as Firebase has a few channels at the moment! I'll delete the Twitter comments as Twitter is really for marketing, not support |
@nikmartin no need to delete the Twitter comments! We're always happy to get good feedback on any channel. Although you're right that we don't actively monitor every reply to |
In using the functions emulator a bit more, although it was cumbersome since i have ~100 firebase functions, I discovered |
@nikmartin glad that you have a temporary workaround! |
I think you probably have a handle on this, but just to add more info, if I run the emulator with |
@nikmartin I am working on a solution over here: Let me know what you think. |
That looks great, I think that will work perfectly. |
@samtstern
Sooo... Is there any update on that feature? :) It would extremely useful! |
@fpeterdev yes it's not documented yet (on my to-do list!) but there is a function in Example: const testing = require('@firebase/rules-unit-testing');
await testing.withFunctionTriggersDisabled(async () => {
await doSomeDataThing();
// ...
}); |
Thank you! Will such an option be available from the UI during import? We are using the emulator for development as well, and it would be great if we could reload the initial data to the database without restarting the emulator. |
[REQUIRED] Environment info
firebase-tools: 8.4.0
Platform: Arch Linux
[REQUIRED] Test case
Export a modest dataset from an existing project. Im my case RTDB json export is 7.5 MB, and my functions count is about 95, with approximately 75% of those are triggers of some sort.
[REQUIRED] Steps to reproduce
Initialize the emulator for RTDB and functions, then start emulator. Import a 7.5mb json file into RTDB. Memory starts increasing at a rate of about 1gb per second, until my OOM manager starts killing processes. My project has about 95 functions, and 75% of those are database triggers. My assumption is that a lot of triggers are firing simultaneously.
[REQUIRED] Expected behavior
This may be a bug, but a feature would be a bootstrap mode that lets me import data without any database triggers firing.
[REQUIRED] Actual behavior
The emulator itself continues to run, by my OOM manager starts killing processes to try to accomodate the memory usage, until pretty much all processes have been killed. The app itself never throws any errors.
The text was updated successfully, but these errors were encountered: