How to avoid the DEADLINE_EXCEEDED error in Firestore when writing many documents per second

If you stumbled upon the DEADLINE_EXCEEDED error when using Firebase Firestore then it is probably because you have been writing documents over the limit which is one document per second. This is from the Firebase website. Limit the collection write rate 1,000 operations/second Keep the rate of write operations for an individual collection under 1,000 …