I'm trying to remove a node (~100GB) in firebase using Firebase CLI
firebase database:remove /node and it works very slow. I cannot see any progress in the console but after 8 hours of running command, my Firebase storage amount is reduced by 5 GB only. Is there any way to efficiently remove large nodes?
Related
I have 2 storage buckets connected to my Firebase project. I've tried to access the second storage bucket during emulation but with no success. I've also tried to switch between storage buckets when I enable the firebase emulators - also did not work.
I found this raised issue on firebase-tools (https://github.com/firebase/firebase-tools/issues/4913) which essentially describes the same problem I have.
Is there a fix / work-around for this issue now?
I am trying to figure out why firebase storage usage is far above my expectation
I only have few photo files in my Firebase storage, just around 75 photos, 100kb for each photo. but my bytes stored and object counts is way above my expectation as you can see in the image above. in this case, maybe I find the answer from the documentation in here
When you deploy your function's source code to Cloud Functions, that
source is stored in a Cloud Storage bucket. Cloud Build then
automatically builds your code into a container image and pushes that
image to Container Registry. Cloud Functions accesses this image when
it needs to run the container to execute your function.
The process of building the image is entirely automatic and requires
no direct input from you
it is probably because I create a lot of cloud function. thats why the bytes stored and object count in my Firebase Storage is big
now I need to know why storage bandwidth is up to 20.2 GB in a month. I am still developing my app, the user is just me. I don't think I will hit 20.2 GB in a month, because in my Android app, I use cache when showing the image.
I am suspicious, the reason why my storage bandwidth usage is too high is because of cloud function. in August, I perform a lot of firebase deploy to my cloud function. will Cloud Function affect Firebase Storage bandwidth usage ?
I am in Indonesia, my Firebase Storage and Firestore are located in asia-southeast2, but my Cloud Function is located in asia-east2. my cloud function perform some operation to my firestore and images in storage. but still I don't think it will hit 20.2 GB per month
as you can see from the image above, the bandwidth usage is separated into 3 different parts
asia.artifacts.projectID.appspot.com
gcf-sources-5900904-asia-east2
projectID.appspot.com
the asia.artifacts.projectID.appspot.com seems way above the other, it is up to 4.3 GB
thats some information of my problem. so I need to know, will cloud function deployment/operation affect my Firebase Storage Bandwidth usage ?
I need to understand why this is happened, because I am worried that I will have unexpected cost if a lot of users use my app.
I was surprised by the bandwidth usage too.
First, Firebase Changed some policy
After August 17, 2020, each deployment operation will incur small-scale charges for the >storage space used for the function's container. For example, if your functions consume ?>1GB of storage via Container Registry, you'll be billed $0.026 per month. If your >development process depends on deploying functions for testing, you can further minimize >costs by using the Firebase Local Emulator Suite during development.
So the most reasonable explanation is cloud function build during npm install generates bandwidth usage of downloading node_modules and also takes up storage.
I would suggest use local emulator during development as much as possible, but many cases production test is inevitable, so sad.
The part of the documentation you quoted that's relevant here is:
Cloud Functions accesses this image when it needs to run the container to execute your function.
The built images are being accessed by Cloud Functions in order to run your code that's built into the image. Although the documentation doesn't specify, I would guess that every cold start of a function requires a download of the image from the artifacts bucket. This would explain the usage on that bucket.
Firebase Storage is using 490 MB, but no bucket has been initialized.
I am not able to track where this storage com from, but it is quite strange to check that Firebase is charging 0.10 USD for an empty Storage.
Where can I delete this storage and why firebase is charging for having no buckets?
Currently I am using Firebase Authentication, Firestore, Realtime Database, Hosting and Functions.
Every time you deploy to Cloud Functions, it takes some space in a new storage bucket. This is covered in the documentation FAQ about Cloud Functions billing for node 10.
You can delete those files over time if you want.
My recommendation is to use object lifecycles in the artifacts storage bucket! that way the files deletion is automated.
Follow this documentation:
https://cloud.google.com/storage/docs/lifecycle
(Firebase should be the one responsible for creating this rule!)
I started using Firestore recently (Free plan) in my iOS app, the app is in Production now, and I see huge discrepancy in the number of Reads. App Engine Quota shows 1M reads of 0.05M (free quota) (Cloud Firestore Read Operations), while Firebase Console (Database tab) shows just a one hundred reads for today - 10,000 times difference!
The app can still read the data from the servers (it's not from cache as I tried to delete the app and reinstall), so the Firestore functionality is not limited by exceeding the free quota.
Each app user can read only one document (via listener) with applied security rules, and it reads own document only 3-5 times per session. There are about 50 users so far, so the expected number of reads matches Firebase console.
Is there a known bug in App Engine console?
Is there a way or free tool to understand the source of all those reads?
Which reporting tool is more reliable in general - Firebase Console or App Engine Console?
I appreciate your help guys!
I´m using the Firebase Realtime Database and Cloud Functions.
I´m testing my app with two users.
However, in my Database Usage Page it says that the maximum concurrent connections were 37. Also, it says that I had 8 simultaneous connections at a day on which I actually did not test my app at all.
How does this work? I´m familiar with the definition given in the Firebase FAQ.
Do cloud functions count to the connections as well?
Best regards