Synchronous execution limit
- Default
- 60 seconds
- Configurable?
- No
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.
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.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
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.
Run netlify logs --function your-function for the last 10 minutes of activity, or add --follow for a live stream.
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.
Wrap database and API calls with timestamps. A single slow upstream call is the usual reason a function nears 60 seconds.
netlify logs --function your-function
netlify logs --function your-function --followNetlify'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.
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.[functions.process]
background = trueBackground 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.
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",
}export const config: Config = {
memory: "2gb", // or memory: 2048
path: "/heavy",
}[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.
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.
4 questions people ask next, answered from the sources on this page.
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.
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.
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.
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.
Run the free audit, then approve the fixes. Every change can be undone.