Free auditStart free
GuideError · CDN and hosting errors

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.

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 withChatGPTClaudePerplexityGoogleAI Mode
01Netlify 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
02How 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.

03Check 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",
}
04Your 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.

05Explained

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.

01What 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.

02Can 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.

03How 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.

04Why 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. 01Netlify Docs: Optional configuration for functionsdocs.netlify.com · checked 2026-11-01
  2. 02Netlify Docs: Background Functions overviewdocs.netlify.com · checked 2026-11-01
  3. 03Netlify Docs: Function logsdocs.netlify.com · checked 2026-11-01
  4. 04Netlify Docs: Scheduled Functionsdocs.netlify.com · checked 2026-11-01
  5. 05How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane