-
Notifications
You must be signed in to change notification settings - Fork 204
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
Various Firebase functions started reporting crash: Maximum call stack size exceeded #1539
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
We started experiencing the same errors today across our Firestore triggered functions, both with functions v4.7.0 and 4.8.0. |
We started experiencing these issues intermittently as well on production after a deployment this past Friday afternoon. The changes that were deployed were fairly minor and we've had a tough time trying to isolate the cause. The errors are occurring in multiple trigger functions with no obvious reasoning. The errors don't seem to line up with actions that are actually occurring within the function thus the confusion in attempting to debug. |
This seems related to a new feature released about a week ago. Downgrading the Firebase Functions SDK can give you a workaround. To help me diagnose:
|
@inlined We are not using onInit callback. We're using firebase functions 4.6.0 right now. We thought we had a fix on our side but the errors are still occurring and the places they are being thrown from don't seem to make much sense. Our errors are occurring from event trigger v1 functions that had been running fine for 2+ years. |
@inlined Is there a particular version of firebase functions that is safe from this error/issue? I'm curious as to why we are seeing these errors yet we have version 4.6 in our package.json |
@inlined thanks for looking into this!
|
@bhr We installed the latest 4.8.1 just released and deployed one of our problem functions with that version. Short sample size but no new errors in about 35 minutes and the execution time of the trigger function has dropped back to where it was prior to issues and is staying there. |
@jttaynton-chattr Thanks for the hint! Upgrading to 4.8.1 resolved the issue indeed. Execution time went down to level where it was supposed to be. No error's been thrown in the past 30 minutes |
Thanks for your patience. We added a new We're very sorry for this issue and how stressful it may have been. This error slipped through our testing since it only becomes a problem at notable scale. The good news is that unless you manually turned off retries for your functions, everything would have been successfully retried. |
Various Firebase functions started reporting the crash: Maximum call stack size exceeded.
The issue started occurring after we deployed Firebase cloud functions to the production environment on March 9 2024 at ~1:30 PM GMT. The last deployment before the issue started appearing was Mar 1 2024 at 12:00 GMT.
Affected Firebase functions are triggered by Cloud Firestore or PubSub, not https.
Related issues
#1527 , but related to https functions
[REQUIRED] Version info
node:
20
firebase-functions:
firebase-functions@npm:4.6.0
reproducing on firebase-functions@npm:4.8.0 too
firebase-tools:
13.4.1
firebase-admin:
firebase-admin@npm:12.0.0
[REQUIRED] Test case
A simple cloud function that sets a value on the document that's changed. The issue appears on many cloud functions that perform Firestore update operations.
[REQUIRED] Steps to reproduce
Deploy FCF. After a few hours, errors start appearing in Google Error Reporting. This only happens in the production environment where there's more activity (e.g. 600k invocations per 24hrs).
[REQUIRED] Expected behavior
FCF should not crash.
[REQUIRED] Actual behavior
Were you able to successfully deploy your functions?
Yes
No
The text was updated successfully, but these errors were encountered: