-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloud Function updating Firestore document throws CANCELLED: Call cancelled #2167
Comments
We are seeing the exact same error. Interested in solution. |
Thanks for reporting @carlbleick. grpc attempts to retry requests that fail if they are considered retryable (several error codes are considered retryable). It then ultimately gives up after a certain number of retries. The above error hints that a retryable error had occurred and after retrying a certain number of times, grpc gave up on it. If I understand correctly the issue started occurring without any changes to your firebase-admin/Firestore/Functions/grpc SDK dependency versions. So I suspect that the doc update kept failing either for a legitimate reason (limits?) or because the Functions environment or Firestore backend experienced an issue. I'd be interested to know whether the issue persists. |
Just received this error again and according to my logs the document did not get any other update during that time (the next update for the document occurred 1 minute later and worked just fine). How can I validate whether we are hitting a Firestore limit? Based on document size, update size and update rate I can assure that no limit is hit. Can I provide more information that would help you investigate? |
Thanks for the update. It doesn't sound like an issue with limits based on your comment. The only thing that could help would be a way to reproduce this or any other relevant logs other than the stack trace above. As I mentioned earlier, since no SDK version changes lead to the issue it's likely a backend issue for which I can't provide much further assistance here. You can reach out to Cloud support and provide your project ID to further investigate. |
@carlbleick if you do get resolution from support can you please post it here |
@ilya-allclear I will keep you updated. Are you using the same SDK versions?
|
Environment
firebase-admin
: 12.1.1,=>
@google-cloud/firestore
: 7.9.0firebase-functions
: 5.0.1Problem
We are experiencing a problem where one of our Cloud Functions is trying to update a Firestore document (simplified)
This pattern is used for many updates and our app has ~80.000 writes daily.
In very rare occasions the update fails due to the following error:
The same error appeared only 3 times since 2024-07-16 and never before.
I have not been able to figure out why this is happening.
My assumption was that
@grpc/grpc-js
fails because the Firestore denies the write? But according to the logs the same document received no other updates and the update size is minimal. A rate limit or size limit wouldn't make sense to me.The text was updated successfully, but these errors were encountered: