Git Product home page Git Product logo

Comments (10)

lowe0292 avatar lowe0292 commented on September 26, 2024 1

Scratch that, still leaking.

Reading the result appears to resolve the memory issue, but it slows the individuals requests by a ton. I'll leave it running overnight and see where it's at in the AM.

from firebase-streaming-import.

JMatharu avatar JMatharu commented on September 26, 2024

04_37_48-administrator_ c__windows_system32_cmd exe-mathaj-000450

Same issue with me and the file size is 135MB

from firebase-streaming-import.

ROODAY avatar ROODAY commented on September 26, 2024

I'm not sure, but I think this error is due to a particular object/property
being too large. I don't how to get the Streaming Import tool to work, but
writing a custom script in Node.js ended up being far more efficient.
Here's the code I used, you can modify it to fit your needs:
https://raw.githubusercontent.com/ROODAY/NECIR-Hackathon/conversion-script/uploader.js

It converts CSV to JSON before uploading, but you could just make use of
the uploading bit if you already have JSON. Just note that in its current
state, it notifies when the last object has been uploaded to Firebase, but
the script will still need to run for a while if you are uploading a lot of
data, as it seemed that Firebase needs some more time to save the data it
receives.

from firebase-streaming-import.

lowe0292 avatar lowe0292 commented on September 26, 2024

Might be unrelated, but I think there's a memory leak. I'm running the import script against ~400MB json file and it's taking on the order of 10GB of RAM to complete.

from firebase-streaming-import.

lowe0292 avatar lowe0292 commented on September 26, 2024

Alright think I figured it out. Apparently the pp module that this is using to do the requests in parallel won't release the memory until you read the result, and reading the result significantly slows down the process.

I replaced this line with parallelJobs = pp.Server('autodetect', (), None, True), and it seemed to do the trick (the fourth param is whether to restart worker process after each task completion and defaults to false).

from firebase-streaming-import.

philshem avatar philshem commented on September 26, 2024

@lowe0292 is it still running? ;)

What's the status of this repository?
I see no updates for 4 years, and my uploads never finish.

from firebase-streaming-import.

lowe0292 avatar lowe0292 commented on September 26, 2024

@philshem never solved it and gave up, Sorry!

from firebase-streaming-import.

ROODAY avatar ROODAY commented on September 26, 2024

@philshem Did you try the uploader script I made? I haven't touched it since I made it but it worked at the time, might help ya here.

from firebase-streaming-import.

philshem avatar philshem commented on September 26, 2024

@ROODAY I saw it but didn't use it because simpler than editing the script was for me to splitting my BIG json in 10 smaller ones, and looping around firebase-import.

from firebase-streaming-import.

ROODAY avatar ROODAY commented on September 26, 2024

Closing as there are posted workarounds above, feel free to re-open if the bug is being worked on!

from firebase-streaming-import.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.