4

I developed a sample application using Angular and Firestore. I deployed my application about 2 months ago and since then always has worked great.

In the last week, however, I noticed that the application is blocked after a couple of hours of usage for "client offline" error. I found out that after 2 hours of usage I exceed the daily quota of reading operations.

The limit is 0,05 milions operations. But normally I make 30-40 operations in a hour and I never got error before the last days.

Is something changed?

Thanks

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
user3471528
  • 3,013
  • 6
  • 36
  • 60
  • 1
    Hi, i guess there is bug in their system or they changes something and never announced it. I have the same problem with my test app. After a few calls (20-30) i get the same error. On thing to be sure, the problem is not from the angular. ;) – Hristo Staykov Feb 08 '18 at 12:20
  • 1
    I just ran a few of my scripts and don't immediately run into problems. Are you sure you aren't reading collections that have grown over time? – Frank van Puffelen Feb 08 '18 at 14:30
  • These types of questions are better sent to the mail list on Google Groups: https://groups.google.com/forum/#!forum/google-cloud-firestore-discuss – Dan McGrath Feb 08 '18 at 15:13

1 Answers1

5

After this question was asked on Google Groups, a user called Michael Lehenbauer replied with the following:

Be aware that billing is based on document reads and so if you do a query with many results, each document counts as a read.

So unless you limit the reads performed, all documents in the collection or a parent document are read which can lead to many requests once your database grows (Which would explain why the app worked before).

A possible workaround to do this would be to cache the data somewhere locally and refresh it after some time or to add a limit clause to your requests.

Filnor
  • 1,290
  • 2
  • 23
  • 28