Closed akhaya closed 1 year ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Transferring to the JS SDK repo since this seems to be an issue with the @firebase/database
package that implements the RTDB API.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Just checking in to see if there is an update around this?
We are seeing this as well on our end and having difficulty pinpointing where it's occurring in our system
We are also experiencing this issue in our production environment! The sdk appears to retry for an indefinite amount of time.
The workaround we landed on was implementing 30 second a Promise.race
timeout, after which point we can continue executing our process and/or terminate the ref connection.
Please correct the retry implementation, making the error properly surface to the ref .once('value')
promise, so that we can stop relying on a timeout and guesswork!
I also saw this today, with both .on
and .once
. At first I thought this happened due to the 256mb RTDB limit on reads applying to both .once
(unsurprising) and .on
(surprising). But I don't think this is true because I'm pretty sure that on our codebase we've loaded way more than 256mb with .once
and .on
.
I think it has to do with the size of individual paths though. We usually load a path called that contains objects with a roughly 20kb string, in the order of up to 1k objects on this path, hundreds of thousands of time a day, for more than a year now. But this time the strings were ~600kb instead, one of each of ~1000 objects. This was the first time we saw the error.
Our path looks something like below, and we query ordering by t
:
{
"logs": {
"-MW-LUEQ13LfrxK5Bm_i": {
"t": 1,
"tx": "string here"
},
"-MW-LujwGVl-_VRXAUHv": {
"t": 2,
"tx": "string here"
},
"-MW-LuMF2qnWDrtpz8NH": {
"t": 3,
"tx": "string here"
},
"-MW-LutO1gGbb0mCf6B_": {
"t": 4,
"tx": "string here"
},
"-MW-LuVjbIi0oDuptQSo": {
"t": 5,
"tx": "string here"
},
"-MW-Lv5YYpUlvQM11_dM": {
"t": 6,
"tx": "string here"
}
}
}
We experienced this today and are actively seeking a workaround.
You will need to chunk your request. I created a script to do so in order to backup the entire node. You can adapt as needed: https://bigballi.com/blog/how-to-backup-firebase-realtime-database
Hey @akhaya. 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!
Since there haven't been any recent updates here, I am going to close this issue.
@akhaya 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.
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Upon calling someRef.once('value'), firebase-admin client gets stuck in a loop disconnecting/reconnecting and reattempting the same query after encountering the following error:
FIREBASE INTERNAL ERROR: Server Error: The specified payload is too large, please request a location with less data.
Even if the original request to the server is cancelled, the client continues to reconnect and log that internal error, causing all future requests to that same server to stall as well, since the client is unable to perform any other read/write operations after it has encountered this error.
We tried await in a try/catch block, as well as using then/catch and in either case the promise was not resolving or throwing an error. It was just stuck on the line of code calling
.once('value')
.Expected behavior:
Client should throw an error when this happens, allowing the server to handle it in a catch block, and allowing the server to continue using the client for any further queries.
Steps to reproduce:
undefined
to db.ref() - see relevant code)FIREBASE INTERNAL ERROR: Server Error: The specified payload is too large, please request a location with less data.
Relevant Code:
Simplified example of code:
Logs
The above logs repeated continuously until
2020-12-16T16:40:03.420Z
Possibly Related Issues
https://github.com/firebase/firebase-admin-node/issues/1036 https://stackoverflow.com/questions/52911753/firebase-gets-stuck-when-reading-too-much-data