Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
cloud function triggering delay and retry

I have a firebase trigger function with failurePolicy: true (the function will automatically retry if fails).

I avoid infinite retry loops as described here : https://cloud.google.com/functions/docs/bestpractices/retries#set_an_end_condition_to_avoid_infinite_retry_loops

const eventAge = Date.now() - Date.parse(event.timestamp);
const eventMaxAge = 10000;

// Ignore events that are too old
if (eventAge > eventMaxAge) {
  console.log(`Dropping event ${event} with age ${eventAge} ms.`);
  callback();
  return;
}

I also set the eventMaxAge at 10000ms, but sometimes I get error message with an event age superior > 10000ms on the first processing (not a retry).

Dropping event xxx with age 63210 ms.

That means the function has been first triggered 63s after the event (!) and the function has dropped the event without being processed.

What are the delays for a function to be triggered? How do you handle such case to be certain the event is processed ?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!