Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Realtime Database Trigger inactive after idle period

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.

like image 553
Erik van den Hoorn Avatar asked Mar 30 '18 10:03

Erik van den Hoorn


1 Answers

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

like image 131
Bob Snyder Avatar answered Sep 29 '22 13:09

Bob Snyder