问题
Firestore offers 50000 documents read operations as part of its free bundle.
However, in my application, the client is fetching a collection containing price data. The price data is created over time. Hence, starting from a specific timestamp, the client can read up to 1000 documents. Each document represents one timestamp with the price information. This is means that if the client refreshes his/her web browser 50 times, it will exhaust my quota immediately. And that is just for a single client. That is what happened. And got this error:
Error: 8 RESOURCE_EXHAUSTED: Quota exceeded
The price data are static. Once they have been written, it is not supposed to change. Is there a solution for this issue or I should consider other database other than Firestore?
回答1:
The error message indicates that you've exhausted the quota that is available. On the free plan the quota is 50,000 document reads per day, so you've read that number of documents already.
Possible solutions:
- Upgrade to a paid plan, which has a much higher quota.
- Wait until tomorrow to continue, since the quota resets every day.
- Try in another free project, since each project has its own quota.
来源:https://stackoverflow.com/questions/52274559/firestore-limit