尝试使用 python 计算 firestore 集合中的文档数量。当我使用时db.collection('xxxx").stream(),出现以下错误:
503 The datastore operation timed out, or the data was temporarily unavailable.
Run Code Online (Sandbox Code Playgroud)
大约进行到一半。它工作正常。这是代码:
docs = db.collection(u'theDatabase').stream()
count = 0
for doc in docs:
count += 1
print (count)
Run Code Online (Sandbox Code Playgroud)
每次我在大约 73,000 条记录中收到 503 错误时。有谁知道如何克服 20 秒超时?