Slash forward icon
run
  • Latest
    The framework for building agents
    Frameworks
    • Next.js
    • Svelte
    • Nuxt
    • Nitro
    SDKs
    • AI SDK
    • Chat SDK
    • Flags SDK
    • Workflow SDK
    Other
    • Turborepo
    • Shadcn
    • SWR
    • just-bash
    • deepsec
  • Docs
  • Playground
GitHub
DocsPlaygroundGitHub
Vercel OSS

Latest

  • eve

Frameworks

  • Next.js
  • Svelte
  • Nuxt
  • Nitro

SDKs

  • AI SDK
  • Chat SDK
  • Flags SDK
  • Workflow SDK

Other

  • Turborepo
  • Shadcn
  • SWR
  • just-bash
  • deepsec
  • Introduction
  • Advanced
  • API Reference
  • Overview
  • run
  • createRunner
  • getHostFunctionContext
  • createSignedContinuationCodec
  • createStoredContinuationCodec
  • isRunInterruptedResult
  • setMaxWorkers
  • Errors
  • Types
API Reference

setMaxWorkers

API Reference for setMaxWorkers.

setMaxWorkers()

Set the process-wide maximum number of active run workers.

import { setMaxWorkers } from 'run';

setMaxWorkers(8);

// Restore the dynamic memory-based default.
setMaxWorkers();

Import

import { setMaxWorkers } from 'run';

API Signature

Parameters

Prop

Type

Returns

Prop

Type

PreviousisRunInterruptedResultNextErrors

On this page

setMaxWorkers()ImportAPI SignatureParametersReturns

Agent Stack

  • AI SDK
  • AI Gateway
  • Sandbox
  • Workflows
  • ConnectNew
  • PassportNew
  • eveNew

Core Platform

  • CI/CD
  • Content Delivery
  • Fluid Compute
  • Observability

Security

  • Platform Security
  • WAF
  • Bot Management
  • Bot ID

Tools

  • Vercel DropNew
  • Vercel Agent
  • Vercel PluginNew
  • Agent Skills
  • Next.js
  • Domains
  • v0

Frameworks

  • eveNew
  • Nuxt
  • SvelteKit
  • Nitro
  • Turborepo
  • Tanstack Start
  • FastAPI
  • xmcp
  • All frameworks

SDKs

  • Vercel SDK
  • Workflow SDKNew
  • Flags SDK
  • Chat SDKNew
  • Queues SDKNew
  • Streamdown

Build

  • AI Apps
  • Web Apps
  • Marketing Sites
  • Platforms
  • Commerce
  • Platform Engineers
  • Design Engineers

Learn

  • Docs
  • Blog
  • Changelog
  • Knowledge Base
  • Academy
  • Articles
  • Community

Explore

  • Customers
  • Marketplace
  • Templates
  • Partner Finder
  • Vercel + AWS

Company

  • About
  • Careers
  • Press
  • Events
  • Startups
  • Shipped on Vercel
  • Open Source Program
  • Enterprise
  • Pricing
  • Help

Legal & Trust

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA
  • Acceptable Use Policy
  • Legal
  • Trust Center
  • Status

Social

  • GitHub
  • X
  • LinkedIn
  • YouTube
  • Instagram