Firebase database wasn't reachable. How often does it happen? - firebase

Each of failed requests was stalled for 10 seconds, so for 40 seconds my app couldn't reach the Firebase database.
I tried to open https://console.firebase.google.com/ and I couldn't react it either.
While https://status.firebase.google.com/ said that database is in normal operations. And any other web pages I opened worked normally.
Is it normal and how often does it happen?

If you think Firebase has downtime, always check the Firebase status dashboard as you did.
You'll see there that we regularly post for interruptions on the individual database servers. But the time of the last status update doesn't match with your post, so it is unlikely you were seeing an outage.
Since you also couldn't reach the console, which hasn't had any reported outage in over a week, it is much more likely that there was an interruption between your machine and the Firebase servers.

Related

Error loading collections You have gone over your daily usage limits

My app is still in development and I uploaded about 35.6 MB of images to firebase storage.
suddenly the application stopped working and I cannot access the Firestore From the Firebase console. it shows the message
Error loading collections
You have gone over your daily usage limits
Is it possible that I have reached the limit and we are only 3 people currently using the application? Or is there an error in the firebase?
Will the problem be solved if I enabled payment in my account?
How much will I expect to pay monthly?
It is quite common to go over your free quota much earlier than you'd expect during development. During this phase developers usually keep the Firestore console open, and any data that the console reads is also charged. So you'll first want to check that, and see if you really need to keep the console open - or if you can see what you need in your app already, or with some dedicated queries.
Will the problem be solved if I enabled payment in my account?
If you've hit the free quota of your project, moving the project onto the paid/Blaze plan will remove/increase that quota.
How much will I expect to pay monthly?
Firestore pricing depends solely on your usage, so I recommend checking out the Firebase pricing page (and the calculator at the bottom)

ERR_SSL_PROTOCOL_ERROR while making request to Firebase Realtime Database. Database was deleted

My web app I was currently developing, fetches a token (that I have stored in firebase) so it can get data from an api when the app first runs. And it's been working fine for weeks making requests back and forth no problem. Then suddenly it gives me a "ERR_SSL_PROTOCOL_ERROR" when making that request. Checked the database everything looks fine, then in a couple of minutes it's suddenly emptied out/deleted. I cant even manually add anything. Tried a PUT request to add something, get that error for that too.
Screenshot of error
I'm still new to development/first time using firebase.
Edit: You know I never added any rules to the database, and it had been 30 days I believe since I created it. Could that have been it? I was going to do it before deploying and thought I would finish before 30 days.
EDIT: Fixed it!
Okay so turns out I just needed to sign out of my other google accounts I was signed in.
With no answers, I had decided just to start a new firebase project, but then that one also didn't work but it said "unable to load your database" which led me to this Upgrading Firebase: "Unable to load your database"

Firebase realtime database's unknown pending issue occur every day

We have a mobile app service on Firebase.
Our service's concurrent connection is of almost 5,000 ~ 10,000.
I know, it does NOT matter with performance limitations.
But, we have an issue about Realtime Database's pending (1~3 minutes).
It occurs every single day at night time, even with few connections.
We started logging the main realtime database with Elasticsearch because of these pending issues.
This pending issue can be checked in detail.
If occurs db's pending, our app going to disable in 1~3 minutes suddenly (db load 3% -> 100%)
and we can checked 'concurrent-connect/concurrent-disconnect' of almost concurrent users in same time.
I have attached a relevant screen capture. This issue can also be checked in GCP's Stackdriver.
We guess this issue was generated logic of Firebase assigned performance because of usage difference daytime with nighttime.
I've contacted support 3 days ago but haven't received a reply yet.
So, I wondering if anyone has the same problem or knows of this issue.
stackdriver captured
elk captured
It sounds like you're performing a bulk read or write operation every day at the same time. This type of operation typically comes from a batch process and is unrelated to the number of active users of your app. In fact, the bulk read/write will lock out the regular users of your app.
An example of such a batch process could be a bulk read that every night synchronizes the data in the Firebase Realtime Database with Elasticsearch, but there are many more options.
If there's indeed a batch process that is causing this load, you'll want to look into:
Either splitting the process into multiple smaller steps, so that they can intersperse with the traffic from your regular clients.
Or running the same type of process on a backup of the database. Since you'd be running against a local file, it won't interfere with the regular clients, and the backup is made by an out-of-band process (so not causing interference either).

Firebase unexpected number of concurrent connections

I just hit a situation which pushed me to ask this question:
I have about 150 active monthly users and I just hit 1k concurrent connections on a single day.
I did research and found many questions on "firebase concurrent connections" topic and those who refers to user-to-concurrent ratio say that on average it's close to 1 concurrent = ~1400 monthly users (like here and here).
I'm now trying to understand if I really did something wrong and if yes, how to fix that?
The questions are:
Is it look ok to get 1k concurrent connections with about 150 active users? Or am I reading it wrong?
Is it possible to profile concurrent connections somehow?
What are the typical "connection leaks" when it comes to chrome extensions and how to avoid them?
So far the architecture of the extension is that all the communication with firebase database is made from the background persistent script which is global to a browser instance.
And as a note, 150 active users is an estimation. For upper boundary I can say that I have 472 user records in total and half of them installed the extension and uninstalled it shortly after that - so they are not using it. And about 20% of the installed instances are also disabled in chrome.
Here is what I get after discussing with the support team:
here are other common use cases that can add up to the number of
connections in your app:
Opening your web app in multiple tabs on your browser (1 connection per tab)
Accessing the Realtime Database dashboard from the Firebase Console (1 connection per tab)
Having Realtime Database triggers
So Realtime Database triggers appeared to be my case.
Further discussion revealed the following:
In the case of uploading 200 data points which each trigger a
function, any number of concurrent connections between 1 and 200 is
possible. It all depends on how Cloud Functions scales. In an extreme
case it could just be one instance that processes all 200 events one
at a time. In another extreme case the Cloud Functions system could
decide to spin up 200 new server instances to handle the incoming
events. There's no guarantee as to what will happen here, Cloud
Functions will try to do the right thing. Each case would cost the
user the same amount on their Cloud Functions bill. What's most likely
in a real application (where it's not a complete cold start) is
something in the middle.
There's no need to worry about the number of concurrent connections
from Cloud Functions to RTDB. Cloud Functions would never spin up
anywhere near 100k server instances. So there's no way Cloud Functions
would eat up the whole concurrency limit. That would only happen if
there are many users on the client app accessing your database
directly from their devices.
So the described behavior in my question seems to be expected and it will not come any close to the limit of 100k connections from server side.

Firebase storage Quota has been exceeded

I have set up a test account on firebase just for development purposes.
I made use of the storage feature and so I uploaded manually an image with the size of 400kb which later I downloaded through an IOS application.
All of a sudden the application stopped working and I cannot access the storage from the console.. I get the message "warning Can't connect to server. Try again in a few minutes."
By searching in the stackoverflow, I found some people claiming that this has to do with multiple google accounts signed in from the same browser etc..
The IOS application though, logs the following error:
Error Domain=FIRStorageErrorDomain Code=-13000 "An unknown error occurred, please check the server response." UserInfo={object=images/nicewall.jpg, bucket=partyreports-49b0a.appspot.com, ResponseBody={
"error": {
"code": 402,
"message": "Quota has been exceeded for this project. Please visit the Firebase pricing page to learn more."
}
Please pay attention to the message "Quota has been exceeded.."
How is this even possible? The analytics/events shows "session_start:193" which I assume is how many times the application connected to the Firebase.
Now if my calculations are correct 193x400KB is way less than the 30GB traffic limit..
It is worth noting that I have a second project setup under the same account which I don't use at all.. and the storage is accessible..
After googling a bit, I found that I should have billing information setup.. and so I did.. after a few minutes I can access the storage again..
How can I tell what was wrong?
Was it the billing account? Or that was a random incident?
I do NOT believe my app exceeded the limits
How often the limits reset?
Where can I see the actual limits for each service/feature?
Thanks and sorry for the long post!
Sorry you had issues! Here are some answers:
Was it the billing account? Or that was a random incident?
Unsure why it happened--it's possible that there's a bug in our quota system, or it's possible that you ended up storing or sending more data than you thought. I'm not sure how you're using storage, but if you've got a 400kB image and we have a 1GB/day limit, that's 2500 downloads/day. If you've got 200 users, and they use the app routinely, and the file is downloaded on app start every time, that might explain extra usage.
Our free plan offers 30GB outgoing bandwidth per month, 5GB of data storage total , and 20,000 uploads and 50,000 downloads operations per day--once these limits are hit, the app won't work until the quota resets, or until you upgrade your app. Once you upgrade, the quota limit is removed and the app works, which is why your problem went away.
How often the limits reset?
The bandwidth is 30GB/month, enforced as a daily limit (so every 24 hour period means you're allotted 1GB of bandwidth). This limit resets every day.
Storage is 5GB total, and once exceeded you need to remove additional data (or upgrade your plan) before the app works again.
Operations are 50,000 downloads and 20,000 uploads per day.
See the quota limit docs for more info.
Where can I see the actual limits for each service/feature?
We're working on exposing usage data for each service in their respective sections of the Firebase Console. Stay tuned for more on this.
I had te same issue,
I had upgraded it to blaze plan and then deleted some of the data from the storage and then again downgrade the plan to free and it will start working for testing
firebase limits the number of new Email/Password and Anonymous accounts that your application can create in a day from a single IP address.
you can check this out to change and schedule sign up quota.
Found this in firebase project authentication settings.
For future ref please use cached_network_image and for videos cached_video_player cause believe it or not i just blew through the 1GB limit withing an hour testing the video player using a stored 1mb video. The band with is a problem amongst other things on firebase so cache where you can and if you cant i suggest you find other file hosting services

Resources