I have a Firebase project with a Firebase Function that triggers when changes are made to a node in the Realtime Database. I deployed and tested the Firebase Functions 2 months ago and everything was working fine. When I now update a node in the database the Firebase Function does not trigger anymore. Why is the Firebase Function not triggered anymore? Are the database listeners disabled after a certain period of inactivity? I dont think this is due to the instance spin up time because after several minutes of waiting the function was still not triggered. When I redeploy the exact same functions everything works again.
Update: 22 Mar 2019
See comment below by Firebase team member:
This limitation was removed as of today. You will have to redeploy your Cloud Functions one final time, but after that they shouldn't be auto-removed after 30 days anymore.
I don't find this issue addressed in the Firebase documentation but it is in the Google Cloud documentation:
Max inactivity time for background functions = 30 days
The maximum amount of time that a background function can be kept without any invocation. Functions that are not invoked even once during this time may enter a state in which new events will not trigger them anymore. If this happens, such functions have to be redeployed to start working again. Note: This inactive state is not reflected in the UI, CLI, or API in any way.
Edit:
They have added it in the firebase documentation now: documentation link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With