<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv" -->

---
title: How to Fix Vercel Function Timeouts with Background Jobs
description: Vercel serverless functions have a hard max duration (often 10–60 seconds), which causes timeouts for long-running work like data imports, multi-step AI...
canonical: https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Fix Vercel Function Timeouts with Background Jobs | daily.dev
og:description: Vercel serverless functions have a hard max duration (often 10–60 seconds), which causes timeouts for long-running work like data imports, multi-step AI...
og:url: https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv
og:image: https://api.daily.dev/og/posts/P3K8JVISv.png
og:image:alt: How to Fix Vercel Function Timeouts with Background Jobs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Fix Vercel Function Timeouts with Background Jobs

**[Inngest Blog](https://daily.dev/sources/inngest)** · 6 min read · 0 upvotes · 0 comments

## Summary

Vercel serverless functions have a hard max duration (often 10–60 seconds), which causes timeouts for long-running work like data imports, multi-step AI pipelines, and fan-out notification jobs. Inngest addresses this by orchestrating code as independently retried steps invoked over HTTP, so total job time can exceed a single request's limit while each step stays under the platform ceiling. The code stays in the same Next.js repo and deploys to Vercel; Inngest discovers functions via an official Vercel integration and invokes steps remotely. The guide walks through step.run for durable steps, running steps in parallel with Promise.all, pausing execution with step.sleep, and scheduling future work with step.sleepUntil, framing this as an alternative to standing up a second worker fleet or deploy target like AWS Lambda.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/vercel-long-running-background-functions>

## Questions this post answers

### How can I fix Vercel function timeouts for long-running background jobs in Next.js?

Break the long-running work into independently retried steps orchestrated outside the original HTTP request, rather than relying on a single blocking function call. Each step runs as its own HTTP invocation under Vercel's per-request max duration (often 10-60 seconds), so the total job time can span minutes, hours, or days while individual steps stay within the platform limit. Inngest provides this orchestration using a step.run wrapper and automatic per-step retries, keeping code on Vercel without a second deploy target.

_daily.dev surfaces practical fixes like this for developers debugging Vercel and Next.js timeout errors._

### What is Vercel's maximum function duration and why do my API routes time out?

Vercel Functions have a hard max duration, often in the 10-60 second range depending on plan, because they are designed for short request/response work. When a Next.js route handler, App Router route.ts, or Pages API endpoint still has work left after that limit, Vercel stops the invocation, producing a function timeout. Bumping maxDuration or enabling Fluid Compute helps borderline cases but does not remove the underlying per-request ceiling.

_Developers hitting Next.js API timeouts on Vercel can find related debugging context on daily.dev._

### How do I pause a background job for several days between steps in Inngest?

Use step.sleep with a duration string, such as step.sleep("delay-second-email", "2d"), to pause a function for hours, days, or weeks between steps; Inngest resumes execution automatically after the sleep period. For scheduling a step at a specific future timestamp instead of a relative delay, step.sleepUntil accepts a Date object, useful for reminders tied to an event time like a reservation.

_daily.dev helps developers building delayed workflows like email drip campaigns keep up with orchestration patterns._

## Similar posts on daily.dev

- [Vercel Workflows tutorial: build a durable background job](https://daily.dev/posts/vercel-workflows-tutorial-build-a-durable-background-job-27npsfaqy) · Flavio Copes · 0 upvotes · 1 comments
- [Vercel Functions can now run up to 30 minutes](https://daily.dev/posts/vercel-functions-can-now-run-up-to-30-minutes-uo5rq5mjk) · Vercel · 20 upvotes · 0 comments
- [Durable AI Workflows 2026: Inngest, Trigger.dev, Vercel Workflow](https://daily.dev/posts/durable-ai-workflows-2026-inngest-trigger-dev-vercel-workflow-un2tgyyqs) · Alex CloudStar · 0 upvotes · 0 comments
- [Drain Payload’s Schedule Queue on Serverless, End to End](https://daily.dev/posts/drain-payload-s-schedule-queue-on-serverless-end-to-end-fvn0xqsmt) · Medium · 0 upvotes · 0 comments

---

Tags: [#nextjs](https://daily.dev/tags/nextjs), [#serverless](https://daily.dev/tags/serverless), [#vercel](https://daily.dev/tags/vercel)

[View this post on daily.dev](https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Fix Vercel Function Timeouts with Background Jobs","url":"https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv"},"datePublished":"2026-09-13T19:57:15.409Z","dateModified":"2026-09-13T19:59:29.108Z","description":"Vercel serverless functions have a hard max duration (often 10–60 seconds), which causes timeouts for long-running work like data imports, multi-step AI...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db7e99acc4f4e331075c0f8cdc9c5338?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/db7e99acc4f4e331075c0f8cdc9c5338?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"nextjs,serverless,vercel","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"How to Fix Vercel Function Timeouts with Background Jobs"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-fix-vercel-function-timeouts-with-background-jobs-p3k8jvisv#faq","mainEntity":[{"@type":"Question","name":"How can I fix Vercel function timeouts for long-running background jobs in Next.js?","acceptedAnswer":{"@type":"Answer","text":"Break the long-running work into independently retried steps orchestrated outside the original HTTP request, rather than relying on a single blocking function call. Each step runs as its own HTTP invocation under Vercel's per-request max duration (often 10-60 seconds), so the total job time can span minutes, hours, or days while individual steps stay within the platform limit. Inngest provides this orchestration using a step.run wrapper and automatic per-step retries, keeping code on Vercel without a second deploy target. daily.dev surfaces practical fixes like this for developers debugging Vercel and Next.js timeout errors."}},{"@type":"Question","name":"What is Vercel's maximum function duration and why do my API routes time out?","acceptedAnswer":{"@type":"Answer","text":"Vercel Functions have a hard max duration, often in the 10-60 second range depending on plan, because they are designed for short request/response work. When a Next.js route handler, App Router route.ts, or Pages API endpoint still has work left after that limit, Vercel stops the invocation, producing a function timeout. Bumping maxDuration or enabling Fluid Compute helps borderline cases but does not remove the underlying per-request ceiling. Developers hitting Next.js API timeouts on Vercel can find related debugging context on daily.dev."}},{"@type":"Question","name":"How do I pause a background job for several days between steps in Inngest?","acceptedAnswer":{"@type":"Answer","text":"Use step.sleep with a duration string, such as step.sleep(\"delay-second-email\", \"2d\"), to pause a function for hours, days, or weeks between steps; Inngest resumes execution automatically after the sleep period. For scheduling a step at a specific future timestamp instead of a relative delay, step.sleepUntil accepts a Date object, useful for reminders tied to an event time like a reservation. daily.dev helps developers building delayed workflows like email drip campaigns keep up with orchestration patterns."}}]}
```

