-
Notifications
You must be signed in to change notification settings - Fork 24
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
Firestore updates cause intermittent freezing of event triggers #183
Comments
Update: This is also occurring on Firebase Storage triggers. |
I am observing this issue as well in a number of my cloud functions, but as stated, it's intermittent so I haven't found a reliable way to reproduce it. Generally happens within 1-3 days of deployment. A redeploy resolves it. Additional observations:
INFO 2024-04-10T15:25:38.904447Z [httpRequest.requestMethod: POST] [httpRequest.status: 200] [httpRequest.responseSize: 772 B] [httpRequest.latency: 59.996 s] [httpRequest.userAgent: APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)] https://on-event-created-txulcecjpa-uc.a.run.app/?__GCP_CloudEventsMode=CE_PUBSUB_BINDING
@firestore_fn.on_document_created(document="events/{doc_id}", timeout_sec=60, |
I have not found a "smoking gun" yet or a test scenario that easily reproduces the issue. I can say though that I was able to reduce the occurrence of deadlock in my own functions by reducing calls that GET the document that is the subject of the trigger. For example, rather than passing the document by path and calling:
...I am using |
I am currently testing the 2nd gen on-write Firestore cloud triggers. For some reason, the trigger freezes and stops executing after a few hours from deployment.
It appears that updating a Firestore document is causing the trigger to freeze.
Environment details
google-cloud-firestore
version: 2.15.0Steps to reproduce
Note that this bug is difficult to reproduce and would require some repetition to occur.
test_document_write
HTTP request function andtest_on_document_write
on-write Firestore trigger.test_document_write
function.test_on_document_write
will make the changes in the updated Firestore docs.test_document_write
function.Code example
test_document_write
HTTP Request Functiontest
collection, and increments their fielda
value.test_on_document_write
on-write Firestore triggerb
always matches the value of fielda
.Stack trace
Here's the logs extracted from the GCP Logs Explorer.
downloaded-logs-20240228-171306.json
The text was updated successfully, but these errors were encountered: