# Netlify function timeout

> A Netlify function that runs past its limit is stopped. See the fixed 60, 30 and 15 minute limits, background functions, payload caps, and how to read the logs.

Canonical: https://scaplet.com/errors/cdn/netlify-function-timeout

Guide Error · CDN and hosting errors

A Netlify function that runs past its limit is stopped. See the fixed 60, 30 and 15 minute limits, background functions, payload caps, and how to read the logs.

4 min

read

5

sources

Oct 28, 2026

updated

Scaplet Editorial Team

author

In one line

A Netlify synchronous function stops at 60 seconds, a scheduled function at 30 seconds and a background function at 15 minutes, and none of these limits can be changed. To fix a timeout, make the work faster, give the function more memory or vCPU if it is the bottleneck, or switch to a background function that returns 202 immediately.

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fnetlify-function-timeout%20(%22Netlify%20function%20timeout%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fnetlify-function-timeout%20(%22Netlify%20function%20timeout%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fnetlify-function-timeout%20(%22Netlify%20function%20timeout%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fcdn%2Fnetlify-function-timeout%20(%22Netlify%20function%20timeout%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 5 parts, 4 minutes.

1. [The limits that apply to your function 01](#the-limits-that-apply-to-your-function)
2. [Find out whether it really timed out 02](#find-out-whether-it-really-timed-out)
3. [Fix 1: run long work as a background function 03](#fix-1-run-long-work-as-a-background-function)
4. [Fix 2: make a synchronous function faster 04](#fix-2-make-a-synchronous-function-faster)
5. [What a timeout does to SEO 05](#what-a-timeout-does-to-seo)

_01_Netlify function defaults

## The limits that apply to your function

Netlify publishes the defaults for every function in one table. The execution limits are marked as not configurable, so raising a timeout is not an option. The only choices are to finish sooner or to run in a different mode.

Setting

### Synchronous execution limit

Default

60 seconds

Configurable?

No

Setting

### Scheduled execution limit

Default

30 seconds

Configurable?

No

Setting

### Background execution limit

Default

15 minutes

Configurable?

No

Setting

### Memory

Default

1024 MB

Configurable?

Yes, 1024 to 4096 MB

Setting

### Buffered request/response payload

Default

6 MB

Configurable?

No

Setting

### Streamed response payload

Default

20 MB

Configurable?

No

Setting

### Background request/response payload

Default

256 KB

Configurable?

No

**Binary uploads hit the payload cap sooner**Netlify says binary request payloads such as image uploads are Base64-encoded, which adds approximately 30% overhead, so the effective binary request limit is 4.5 MB rather than 6 MB.

_02_How it works

## Find out whether it really timed out

1. 1

### Open the function log

In the Netlify UI, go to Cloud compute, then Functions, and select the function. The log shows the start of each invocation and your `console.log()` output, and defaults to a live tail.
2. 2

### Or tail it from the CLI

Run `netlify logs --function your-function` for the last 10 minutes of activity, or add `--follow` for a live stream.
3. 3

### Log a start and an end line

Add one `console.log` at the start and one just before you return. A run that logs the first and never the second was cut off or is stuck on a slow call.
4. 4

### Time each outside call

Wrap database and API calls with timestamps. A single slow upstream call is the usual reason a function nears 60 seconds.

Read function logs from your terminal

```
netlify logs --function your-function netlify logs --function your-function --follow
```

Netlify's function log page does not document the HTTP status a client sees when a synchronous function is cut off, so test your own endpoint with `curl -i` and read the log entry for that request rather than assuming a status.

_03_Check it

## Fix 1: run long work as a background function

A background function runs for up to 15 minutes. The client gets an empty `202` response immediately, and the work continues separately. Netlify says that if the invocation returns an error, a retry happens after one minute, and a second retry two minutes after that. You pass the result somewhere other than the caller: a database, a storage bucket, a webhook.

netlify.toml: the same switch

```
[functions.process] background = true
```

Background functions do not return responses, so they do not support response streaming. Their request and response payload cap is 256 KB, much lower than the 6 MB of a synchronous function. Send a pointer to the data, not the data.

netlify/functions/process.mts

```
import type { Config } from "@netlify/functions" export default async (req: Request) => { // Long-running work. The client has already received a 202 response. } export const config: Config = { background: true, path: "/process", }
```

_04_Your call

## Fix 2: make a synchronous function faster

If the work must answer a user, work on what slows it down. Netlify says to reach for memory or vCPU when the function is memory- or compute-intensive, or when out-of-memory errors or timeouts come from the function's own work, not from waiting on a database or external service. If you are unsure, it says to start with the default and tune only after you have a measurement.

If this fits

### Use a background function when

- The caller does not need the result right away
- The job can run longer than 60 seconds
- You can store or send the result elsewhere

Or

### Stay synchronous when

- The user waits on the answer
- The slow part is a query or call you can speed up or cache
- The response has to be larger than 256 KB

netlify/functions/heavy.mts

```
export const config: Config = { memory: "2gb", // or memory: 2048 path: "/heavy", }
```

netlify.toml

```
[functions.heavy] memory = "2gb"
```

Memory accepts 1024 to 4096 MB, and `vcpu` accepts 0.5 to 2.0, with 0.5 mapping to 1024 MB and 2.0 to 4096 MB. Billing scales linearly with the configured size, so raising it has a cost.

_05_Explained

## What a timeout does to SEO

Google says 5xx and 429 responses "prompt Google's crawlers to temporarily slow down with crawling" and that indexed URLs are preserved but "eventually dropped". Keep pages that should rank off the slow path: serve them from a build, and push slow work into background functions. See timeout errors.

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What is the timeout for a Netlify function?

Netlify documents 60 seconds for synchronous functions, 30 seconds for scheduled functions and 15 minutes for background functions. All three are listed as not configurable, so you change the approach rather than the limit.

_02_ Can I increase the Netlify function timeout?

No setting raises it. Netlify lists the execution limits as not configurable. Switch long work to a background function, or give a compute-bound function more memory or vCPU so it finishes within 60 seconds.

_03_ How do I run a task longer than 60 seconds on Netlify?

Use a background function with `background: true`. It returns 202 to the caller right away and may run up to 15 minutes. Deliver results to a place other than the original client, since background functions do not return a response.

_04_ Why does my function fail with a large upload?

Buffered payloads are limited to 6 MB. Binary uploads are Base64-encoded with about 30% overhead, which makes the effective limit about 4.5 MB. Upload large files directly to storage and pass the function a reference.

Sources · 5

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- netlify.com
- google.com

1. 01 [Netlify Docs: Optional configuration for functions](https://docs.netlify.com/build/functions/optional-configuration/) docs.netlify.com · checked 2026-11-01
2. 02 [Netlify Docs: Background Functions overview](https://docs.netlify.com/build/functions/background-functions/) docs.netlify.com · checked 2026-11-01
3. 03 [Netlify Docs: Function logs](https://docs.netlify.com/build/functions/logs/) docs.netlify.com · checked 2026-11-01
4. 04 [Netlify Docs: Scheduled Functions](https://docs.netlify.com/build/functions/scheduled-functions/) docs.netlify.com · checked 2026-11-01
5. 05 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

## Keep learning

[All errors](/errors)

[Learn Vercel FUNCTION_INVOCATION_TIMEOUT CDN and hosting errors](/errors/cdn/vercel-function-invocation-timeout) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next Cloud Run 503 error CDN and hosting errors](/errors/cdn/cloud-run-503) [Do Run a free site audit Free, about two minutes](/site-audit)

More Netlify errors
[Netlify build failed](/errors/cdn/netlify-build-failed)

Nearby in errors
[AWS Lambda timeout](/errors/cdn/lambda-timeout)

More in CDN and hosting errors
[CloudFront 400: Bad Request](/errors/cdn/cloudfront-400) [CloudFront 404 Not Found](/errors/cdn/cloudfront-404) [CloudFront 503: Service Unavailable](/errors/cdn/cloudfront-503) [Firebase Hosting 404](/errors/cdn/firebase-hosting-404) [GitHub Pages 404 Not Found](/errors/cdn/github-pages-404) [Google Cloud 502 Bad Gateway](/errors/cdn/google-cloud-502) [Heroku 503 Service Unavailable](/errors/cdn/heroku-503) [Heroku H10: App crashed](/errors/cdn/heroku-h10-app-crashed) [Heroku H12: Request timeout](/errors/cdn/heroku-h12-request-timeout) [Heroku H13: Connection closed without response](/errors/cdn/heroku-h13) [Heroku H14: No web processes running](/errors/cdn/heroku-h14) [Netlify build failed](/errors/cdn/netlify-build-failed) [Netlify function timeout](/errors/cdn/netlify-function-timeout) [Render 502 Bad Gateway](/errors/cdn/render-502) [S3 Access Denied (403 Forbidden)](/errors/cdn/s3-access-denied) [Vercel 413: FUNCTION_PAYLOAD_TOO_LARGE](/errors/cdn/vercel-payload-too-large) [Vercel 429: Too Many Requests](/errors/cdn/vercel-429) [Vercel 500: Internal Server Error](/errors/cdn/vercel-500) [Vercel build failed](/errors/cdn/vercel-build-failed) [Vercel domain not working](/errors/cdn/vercel-domain-not-working) [Vercel FUNCTION_INVOCATION_TIMEOUT](/errors/cdn/vercel-function-invocation-timeout) [Vercel: too many redirects](/errors/cdn/vercel-too-many-redirects) [Akamai reference number](/errors/cdn/akamai-reference-number) [ALB 503 Service Unavailable](/errors/cdn/alb-503)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
