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

Out of memory (OOM) warning when loading app with persistence enabled #7462

Closed
michaelAtCoalesce opened this issue Jul 14, 2023 · 11 comments
Closed

Comments

@michaelAtCoalesce
Copy link

Operating System

Mac OS x

Browser Version

Version 114.0.5735.198 (Official Build) (arm64) Automatically update Chrome for all users Learn more

Firebase SDK Version

9.22.0

Firebase SDK Product:

Firestore

Describe your project's tooling

create react app with yarn

Describe the problem

when loading one of the pages of our app that is data intensive with firestore local persistence enabled, when the debugger is open we are seeing a warning about potential OOM.

image

upon resuming execution, the app does continue to work, but it is concerning that chrome is saying that it's about to run out of memory.

Steps and code to reproduce issue

this occurs in our application when a lot of data is being handled, which makes it somewhat difficult to create a separate reproducible test case.

im happy to jump on a call and try out binaries as needed.

@michaelAtCoalesce michaelAtCoalesce added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Jul 14, 2023
@jbalidiong jbalidiong added needs-attention and removed new A new issue that hasn't be categoirzed as question, bug or feature request labels Jul 14, 2023
@ehsannas ehsannas self-assigned this Jul 14, 2023
@ehsannas
Copy link
Contributor

ehsannas commented Jul 14, 2023

Thanks for reporting @michaelAtCoalesce.

When persistence is enabled, the Firestore Web SDK should keep most things on disk, and only load necessary pieces of information into the memory. Note that if you make a query, the entire result set is loaded into memory completely. So, if your application is making queries with a large result set, it could use a lot of memory. Have you considered paginating your results?

@google-oss-bot
Copy link
Contributor

Hey @michaelAtCoalesce. 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!

@dconeybe
Copy link
Contributor

Could this be a symptom of #6118?

@ehsannas
Copy link
Contributor

This issue occurs on Chrome, whereas #6118 seems to be a Safari-only issue (web-channel uses a large amount of memory on Safari).

@dconeybe
Copy link
Contributor

This issue occurs on Chrome, whereas #6118 seems to be a Safari-only issue (web-channel uses a large amount of memory on Safari).

True, although the fact that the customer only experiences the issue on mobile Safari could be a red herring. The investigation in b/242550738 (Googlers only, sorry) seems to be converging on a non-Safari-specific root cause. It's something to keep an eye on anyways.

@ehsannas
Copy link
Contributor

Oh, interesting. I wasn't aware of b/242550738. I'll keep following the investigation there.

@google-oss-bot
Copy link
Contributor

Hey @michaelAtCoalesce. 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!

@wu-hui
Copy link
Contributor

wu-hui commented Jul 31, 2023

Hi @michaelAtCoalesce

There are a couple things you can try:

  • Turn off persistence. Do you see OOM warning with persistence off?
  • Turn on longpolling. This is a walkaround for issue referred above (b/242550738), may or may not help with your situation. Please do try and let us know.

Thanks!

@google-oss-bot
Copy link
Contributor

Hey @michaelAtCoalesce. 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!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@michaelAtCoalesce 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.

@dconeybe
Copy link
Contributor

FYI for anyone experiencing this (or a similar issue), it possibly has the same root cause as #6118. So follow that issue and see if its resolution (once it is resolved) helps your situation.

@firebase firebase locked and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants