Vercel function timeout: the limit on each plan, and how to run longer work
Vercel Functions run up to 300 s on Hobby and 800 s on Pro (1,800 s in beta). How to raise maxDuration, and where to run work that needs longer.
A Vercel Function can run for up to 300 seconds (5 minutes) on Hobby and up
to 800 seconds on Pro and Enterprise, where a beta also allows up to 1,800
seconds (30 minutes) for a single function. Every plan starts at a 300-second
default, and you raise it with maxDuration. A function that runs past its
limit is stopped, and the caller gets a 504 with
FUNCTION_INVOCATION_TIMEOUT.
If your work needs longer than that, take it out of the request: queue it,
answer with a job ID, and run it somewhere built for long work.
Gregale publishes this page. Vercel’s limits come from its own docs, checked on December 2, 2026: maximum duration, function limits and fluid compute. Gregale’s limits come from its plans page.
Vercel Function timeout by plan
These are the limits with fluid compute, which Vercel turned on by default for new projects on April 23, 2025.
| Plan | Default | Maximum | Extended maximum (beta) |
|---|---|---|---|
| Hobby | 300 s | 300 s | — |
| Pro | 300 s | 800 s | 1,800 s |
| Enterprise | 300 s | 800 s | 1,800 s |
- The limits apply to Node.js, Bun and Python functions. The time counts everything the invocation does, including sending a streamed response.
- The 1,800-second limit is in beta. It needs a supported runtime version
(Node.js 22, 24 or 26, Bun, or Python 3.12 to 3.14), and you have to set it
on each function, in code or
vercel.json; a project default above 800 seconds isn’t supported yet. It works with Secure Compute and Static IPs, not with BYOC. - Work you hand to
waitUntil()or Next.jsafter()shares the same duration. It doesn’t get its own clock. - Functions on the Edge runtime must start sending a response within 25 seconds, and can then keep streaming for up to 300 seconds.
Seeing a 10-second or 60-second limit? Older guides and forum answers quote limits from before fluid compute was the default. Vercel’s current docs list only the fluid compute limits above. If your project is older than April 2025, check that fluid compute is on in the project’s Functions settings.
How to raise the Vercel timeout
In a Next.js App Router route, export maxDuration from the route file:
// app/api/report/route.ts
export const maxDuration = 800; // seconds: needs Pro or Enterprise
export async function POST(request: Request) {
// ...
}
For other frameworks and runtimes, set it per function path in vercel.json.
A Python framework app (FastAPI, Flask or Django) builds into one function, so
key the entry on its entrypoint file:
{
"functions": {
"api/report.js": { "maxDuration": 800 },
"app/main.py": { "maxDuration": 300 }
}
}
To change the default for the whole project, open the project’s Settings →
Functions (under Advanced Settings with fluid compute) and set Default
Max Duration. Code wins over vercel.json, and vercel.json wins over the
dashboard.
To check what a deployment actually got, run
vercel inspect <deployment-url> --json; each function’s limit is its
timeout field. The plain output doesn’t show it.
A longer limit also means a longer bill when something hangs. With fluid compute you pay for active CPU time and for provisioned memory while the invocation runs, so a function stuck waiting on a slow API for 10 minutes pays for 10 minutes of memory.
Why a function times out when it shouldn’t
Vercel’s error page lists the usual causes: a slow API or database call, a code path that never returns a response, an infinite loop, and errors from an upstream service. Before you raise the limit:
- Put a timeout on every
fetchand database query that is shorter than the function’s limit, so a stuck dependency fails with a clear error instead of a504. - Make sure every branch of the handler returns or ends the response, including error paths.
- Open the function’s logs for the failed request and look for the last line it printed before the timeout.
If a request legitimately needs a long-lived connection, stream progress to the client. Vercel sends HTTP/2 PING frames while a long response is idle, but HTTP/1.1 has no equivalent, so clients and proxies on HTTP/1.1 may close an idle connection. Stream a heartbeat or progress lines while the work runs.
When the work takes longer than the limit
Raising maxDuration doesn’t help when the work takes longer than any plan
allows, or when you’re on Hobby and need more than 5 minutes. Then the request
shouldn’t wait for the work at all:
- The route checks the input, stores a job, and answers
202 Acceptedwith a job ID right away. - Something outside the request runs the job and saves the result.
- The client polls a status route, or you send a webhook when it’s done.
// app/api/reports/route.ts
export async function POST(request: Request) {
const input = await request.json();
const id = crypto.randomUUID();
await enqueue({ id, input }); // your queue or job runner
return Response.json({ id, status: 'queued' }, { status: 202 });
}
Where the job runs is the real choice:
- Stay on Vercel. Vercel Workflows run durable multi-step work, and Vercel describes them as keeping state for minutes to months without duration limits. If your app already lives on Vercel, try this first.
- A queue and a worker elsewhere. Any platform that runs a long-lived process can consume the queue. The frontend stays on Vercel; only the slow part moves.
Running the long part on Gregale
Be clear about one thing first: Gregale’s HTTP request timeouts are shorter than Vercel’s, 30 seconds on Free, 1 minute on Hobby, 5 minutes on Pro and 15 minutes on Scale. Moving a slow request handler to Gregale won’t give it more time. What Gregale has for this is the background side:
| Gregale plan | Longest job task | Running workers per account |
|---|---|---|
| Free ($0) | no jobs | no workers |
| Hobby ($10/mo) | 5 minutes | 1 |
| Pro ($30/mo) | 30 minutes | 3 |
| Scale ($99/mo) | 1 hour | 10 |
- A job runs a container to completion, with retries, a per-task timeout and fan-out over many inputs. See jobs and batch jobs with retries.
- A worker is a process with no HTTP listener that keeps running and leases messages from a queue. While a handler works, the consumer keeps its lease alive. Workers never idle out, so you pay for their RAM for as long as they run. See pull queue workers.
Fixing an n8n Cloud webhook timeout
walks through the same pattern end to end: a small API that answers 202 with
a job ID, and a worker on Gregale that does the slow part.
Other platforms cap request time too: see the AWS Lambda timeout and the Cloud Run timeout.
When to stay on Vercel
- The work fits in 800 seconds. On Pro, set
maxDurationand you’re done. Up to 30 minutes works too if your runtime is on the beta list. - You want everything in one place. Vercel Workflows keep the long work next to the app that starts it.
- You’re on Hobby and the work fits in 5 minutes. Gregale’s Hobby jobs have the same 5-minute cap, so moving buys you nothing there.
Move the slow part when you want a process that keeps running between jobs, a queue with retries you control, or work that needs more than 30 minutes.
What we verified
The Vercel limits, settings and error causes are from Vercel’s docs as of December 2, 2026. We did not run a hosted Vercel timeout test for this page. The Gregale limits are from Gregale’s plans page and its plan limits table on the same date.
Questions
- What is the Vercel function timeout?
With fluid compute, the default is 300 seconds on every plan. Hobby cannot go higher. Pro and Enterprise can set up to 800 seconds, or up to 1,800 seconds per function in a beta.
- How do I increase the Vercel function timeout?
Export maxDuration from a Next.js App Router route file, set functions.<path>.maxDuration in vercel.json for other runtimes, or change Default Max Duration in the project’s Functions settings. Check the result with vercel inspect <deployment-url> --json.
- Why do some guides say the Vercel timeout is 10 seconds?
They quote limits from before fluid compute became the default for new projects on April 23, 2025. Vercel’s current docs list a 300-second default on every plan.
- What should I do when a task takes longer than Vercel allows?
Answer the request with 202 and a job ID, and run the work outside the request: in Vercel Workflows, or in a queue worker or job on another platform. Gregale jobs run up to 30 minutes on Pro and 1 hour on Scale.