# Firebase Cloud Functions: function timed out

> A Firebase Cloud Function timed out: it ran past timeoutSeconds or never finished. Return the promise, raise the timeout, or move slow work to a queue.

Canonical: https://app369.com/fix/firebase-functions-timeout/
Last updated: 2026-11-09

A function timeout is the Firebase error for a function that ran past its timeoutSeconds setting and was stopped. On 2nd gen, HTTP functions run up to 60 minutes and event functions 9; 1st gen stops at 9 minutes. Often the function never told Firebase it was done.

**Short answer**

Check the function ends: return the promise in event functions and send a response in HTTP functions. If the work is slow, raise timeoutSeconds within the limit for its type. For callable functions over 70 seconds, raise the client timeout too. Move long jobs to a task queue.

Rather not fix it yourself? [**App Fix Ticket**](https://app369.com/fixed-price/flutter-firebase-bug-fix/) starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.

## **Why the function times out, and the fix**

1. 01 ### **The function never signals that it finished**
  > “Terminate HTTP functions with res.redirect(), res.send(), or res.end().” [**Firebase, Sync, async, and promises**](https://firebase.google.com/docs/functions/terminate-functions) An event function that doesn’t return its promise, or an HTTP function that never sends a response, runs until the timeout. Return the promise, and end every path with res.send() or res.end().
2. 02 ### **The work is slower than the timeout**
  > “HTTP and callable functions: 3600 seconds (60 minutes) Scheduled/Task queue functions: 1800 seconds (30 minutes) Other event-driven functions: 540 seconds (9 minutes)” [**Firebase, Manage functions (Set timeout and memory allocation)**](https://firebase.google.com/docs/functions/manage-functions) AI calls, file processing and large exports can take minutes. Raise timeoutSeconds within the maximum for its type. The sample is 2nd gen; on 1st gen use runWith({ timeoutSeconds: 540 }) at most.```
const { onRequest } = require('firebase-functions/v2/https');

exports.report = onRequest({ timeoutSeconds: 300, memory: '1GiB' }, async (req, res) => {
  const data = await buildReport();
  res.json(data);
});
```
3. 03 ### **The callable client gives up first**
  > “For HTTP callable functions, the client SDKs enforce a separate default request timeout of 70 seconds (or 60 seconds on Flutter).” [**Firebase, Manage functions**](https://firebase.google.com/docs/functions/manage-functions) The client SDKs stop waiting after 70 seconds, or 60 on Flutter, even when the server timeout is longer. The app then shows deadline-exceeded. Set the client timeout to match, for example httpsCallable(functions, name, { timeout: 300000 }) on the web.
4. 04 ### **An outside API hangs** A fetch with no timeout waits as long as the function lets it. Give outside calls their own timeout, catch the error, and return a clear message instead of hanging.

Checked against the vendor’s docs on November 9, 2026: [Firebase docs: Manage functions](https://firebase.google.com/docs/functions/manage-functions); [Firebase docs: Quotas and limits](https://firebase.google.com/docs/functions/quotas); [Firebase docs: Sync, async, and promises](https://firebase.google.com/docs/functions/terminate-functions).

## **Rather hand it over?**

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

- [from $450**App Fix Ticket**One reproducible bug in an existing mobile or web app, diagnosed and fixed.**See scope and start**](https://app369.com/fixed-price/flutter-firebase-bug-fix/)
- [from $450**AI-Built App Rescue**A Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.****No issues worth fixing, no charge.**** If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.**See scope and start**](https://app369.com/fixed-price/ai-app-rescue/)

[**All 127 Fiverr reviews**](https://app369.com/reviews/)

Related: [**Firebase Functions memory limit exceeded**](https://app369.com/fix/firebase-functions-memory-limit-exceeded/) · [**Firebase Functions 403 Forbidden**](https://app369.com/fix/firebase-functions-403-forbidden/) · [**Firebase Functions deploy failed**](https://app369.com/fix/firebase-functions-deploy-failed/) · [**Firebase callable INTERNAL error**](https://app369.com/fix/firebase-functions-callable-internal-error/)

Questions

## **More on this error**

<details>

<summary>**Does a longer timeout cost more? **+</summary>

You pay for the time a function runs, so a function that hangs until a long timeout costs more. Fix hangs first, then raise the timeout for work that is really slow.

</details>

<details>

<summary>**Can a 1st gen function run for 60 minutes? **+</summary>

No. 1st gen functions stop at 540 seconds. The 60 minute limit is for 2nd gen HTTP functions.

</details>

<details>

<summary>**Can you fix it for me? **+</summary>

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

</details>

A different error?

## **Describe it and get a written quote**

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.

[**Describe your problem **→](https://app369.com/contact/) [**All fixes**](https://app369.com/fix/)