Bolt api

Long-Running Job Timeout - Background Tasks Interrupted

Long-running operations (file processing, email sending, bulk updates) timeout. Tasks don't complete.

Operations that take >30 seconds fail on serverless deployments.

Error Messages You Might See

Operation timeout after 60 seconds Function execution terminated Task interrupted by timeout Job never completed
Operation timeout after 60 secondsFunction execution terminatedTask interrupted by timeoutJob never completed

Common Causes

  1. Running long task synchronously in API route
  2. Serverless timeout shorter than task duration
  3. No background job queue (Bull, RabbitMQ)
  4. Task killed before cleanup code runs
  5. No retry mechanism for failed jobs

How to Fix It

Use background job queue: Bull, RabbitMQ, or cloud services (Google Tasks, AWS SQS)

Pattern: API returns immediately with job ID, frontend polls for status

Implement retry logic with exponential backoff

Add timeout to job: if not complete in 5 min, mark failed and retry

Process jobs outside request context: cron job, worker service, or queue consumer

Real developers can help you.

Costea Adrian Costea Adrian Embedded Engineer specilizing in perception systems. Latest project was a adas camera calibration system. Richard McSorley Richard McSorley Full-Stack Software Engineer with 8+ years building high-performance applications for enterprise clients. Shipped production systems at Walmart (4,000+ stores), Cigna (20M+ users), and Arkansas Blue Cross. 5 patents in retail/supply chain tech. Currently focused on AI integrations, automation tools, and TypeScript-first architectures. Milan Surelia Milan Surelia Milan Surelia is a Mobile App Developer with 5+ years of experience crafting scalable, cross-platform apps at 7Span and Meticha. At 7Span, he engineers feature-rich Flutter apps with smooth performance and modern UI. As the Co-Founder of Meticha, he builds open-source tools and developer-focused products that solve real-world problems. Expertise: 💡 Developing cross-platform apps using Flutter, Dart, and Jetpack Compose for Android, iOS, and Web. 🖋️ Sharing insights through technical writing, blogging, and open-source contributions. 🤝 Collaborating closely with designers, PMs, and developers to build seamless mobile experiences. Notable Achievements: 🎯 Revamped the Vepaar app into Vepaar Store & CRM with a 2x performance boost and smoother UX. 🚀 Launched Compose101 — a Jetpack Compose starter kit to speed up Android development. 🌟 Open source contributions on Github & StackOverflow for Flutter & Dart 🎖️ Worked on improving app performance and user experience with smart solutions. Milan is always happy to connect, work on new ideas, and explore the latest in technology. zipking zipking I am a technologist and product builder dedicated to creating high-impact solutions at the intersection of AI and specialized markets. Currently, I am focused on PropScan (EstateGuard), an AI-driven SaaS platform tailored for the Japanese real estate industry, and exploring the potential of Archify. As an INFJ-T, I approach development with a "systems-thinking" mindset—balancing technical precision with a deep understanding of user needs. I particularly enjoy the challenge of architecting Vertical AI SaaS and optimizing Small Language Models (SLMs) to solve specific, real-world business problems. Whether I'm in a CTO-level leadership role or hands-on with the code, I thrive on building tools that turn complex data into actionable value. PawelPloszaj PawelPloszaj I'm fronted developer with 10+ years of experience with big projects. I have small backend background too MFox MFox Full-stack professional senior engineer (15+years). Extensive experience in software development, qa, and IP networking. Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. Prakash Prajapati Prakash Prajapati I’m a Senior Python Developer specializing in building secure, scalable, and highly available systems. I work primarily with Python, Django, FastAPI, Docker, PostgreSQL, and modern AI tooling such as PydanticAI, focusing on clean architecture, strong design principles, and reliable DevOps practices. I enjoy solving complex engineering problems and designing systems that are maintainable, resilient, and built to scale. Matthew Jordan Matthew Jordan I've been working at a large software company named Kainos for 2 years, and mainly specialise in Platform Engineering. I regularly enjoy working on software products outside of work, and I'm a huge fan of game development using Unity. I personally enjoy Python & C# in my spare time, but I also specialise in multiple different platform-related technologies from my day job. BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

How do I handle long tasks?

Queue the job, return immediately with ID. Frontend polls /api/job/id for status

What's a good job timeout?

Set longer than expected: if usually 2min, set 5min timeout. Prevents premature kills

Should I retry failed jobs?

Yes. Retry with exponential backoff: 1min, 5min, 30min. Max 3-5 retries

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help