Firebase gets stuck when reading too much data

Viewed 851

If my node.js server tries to read too much data - the firebase client would start emitting the error messages as shown below to the stderr.

It doesn't seem right my app just gets stuck and the promise to get the data would never be succeeded nor rejected.

Have you ever seen this? Is there a workaround may be? Thanks!

@firebase/database: FIREBASE INTERNAL ERROR: Server Error: The specified payload is too large, please request a location with less data.
@firebase/database: FIREBASE INTERNAL ERROR: Server Error: The specified payload is too large, please request a location with less data. ...

1 Answers

If you are using firebase realtime database, you can do some indexing on your firebase db to prevent loading all data on your server when doing queries and also you can start with firebase pagination using startAt method

Related