General Limits

The following limits apply to the Trigger.dev Cloud service and users of the self-hosted version of Trigger.dev.

HobbyTeamSelf-hosted / Enterprise
Team MembersUp to 2Up to 5Custom
Projects1Up to 5Custom
Jobs per ProjectUp to 10Up to 50Custom
Runs (per Month)5,000Up to 1mCustom
Run Log retention24 hours7 daysCustom
Connected IntegrationsUp to 50Up to 1000Custom
Task Output Size3MB3MB3MB
Tasks per RunUp to 250Up to 1000Custom
Concurrent Run ExecutionsUp to 10Up to 100Custom
Maximum Task Duration< 2m< 2m< Deployment Grace Period
Maximum Run Execution Durationup to 15mup to 2 hrsCustom
Yielded Executions per RunUp to 100Up to 100Custom

Tasks per Run

For any individual Job Run, the number of Tasks that can be executed is limited to 250 for Hobby and 1000 for Team plans. This limit is enforced to prevent runaway Jobs from consuming excessive resources.

What is a Task?

Tasks are the fundamental building blocks on which the Trigger.dev service is constructed. You can create and run a task using io.runTask():

client.defineJob({
  id: "task-example",
  name: "Task Example",
  version: "1.0.0",
  trigger: eventTrigger({ name: "task.example" }),
  run: async (payload, io, ctx) => {
    const response = await io.runTask("task-1", async (task) => {
      // Do some work here
      return { foo: "bar" };
    });
  },
});

Tasks power the following features as well:

Our integration clients are also built on top of Tasks, so any time you call an integration client method, you are creating a Task. e.g.:

client.defineJob({
  id: "send-resend-email",
  name: "Send Resend Email",
  version: "0.1.0",
  trigger: eventTrigger({
    name: "send.email",
  }),
  integrations: {
    resend,
  },
  run: async (payload, io, ctx) => {
    // This creates a Task
    await io.resend.sendEmail("send-email", {
      to: payload.to,
      subject: payload.subject,
      text: payload.text,
      from: "Trigger.dev <[email protected]>",
    });
  },
});

Anything that shows up as an item on the Run Log is a Task:

Task

Concurrent Run Executions

A Run Execution is a single HTTP request from the Trigger.dev server to your endpoint to execute a run. The number of concurrent Run Executions is limited to 10 for Hobby and Team plans.

This does not include runs that are waiting for a io.wait() to complete, so you could in theory have 1000s of “In Progress” jobs at a given time with no current run executions.

Going over this limit does not abort or cancel runs, but it will prevent new run executions until the number of concurrent executions drops below the limit.

You can limit the execution concurrency of a specific job like so:

client.defineJob({
  id: `test-job-1`,
  name: `Test Job 1`,
  version: "1.0.0",
  trigger: eventTrigger({
    name: "test",
  }),
  concurrencyLimit: 5, // Limit this job to 5 concurrent executions
});

Alternatively, you can limit a group of jobs concurrency limit by defining a concurrency limit and passing it to the defineJobs() method:

const concurrencyLimit = client.defineConcurrencyLimit({
  id: `test-shared`,
  limit: 5, // Limit all jobs in this group to 5 concurrent executions
});

client.defineJob({
  id: `test-job-1`,
  name: `Test Job 1`,
  version: "1.0.0",
  trigger: eventTrigger({
    name: "test",
  }),
  concurrencyLimit,
});

client.defineJob({
  id: `test-job-2`,
  name: `Test Job 2`,
  version: "1.0.0",
  trigger: eventTrigger({
    name: "test",
  }),
  concurrencyLimit,
});

The two jobs above will share the same concurrency limit, so between them they can only have 5 concurrent executions.

Maximum Task Duration

The Maximum Task Duration is the maximum amount of time a single Task can run for. This limit is partly enforced by the Trigger.dev server, but also by the execution runtime of your deployed serverless function.

For example, if you’re deploying to Vercel and using their Node.js Serverless functions, the maximum execution time is anywhere from 1 second to 5 minutes. If you have a single task that can run for longer than your maximum function execution time, it will never complete.

We will retry tasks that never complete due to a timeout, but if the task continues to not complete, it will be marked as cancelled and the run will be timed out with an output like the following:

{
  "message": "Function timeout detected in 10s without any task creation. This is unexpected behavior and could lead to an infinite execution error because the run will never finish. This is likely caused by task \"initial-long-task\" execution exceeding the function timeout"
}

See our Next.js section on Deployment for more information on how to configure your function timeout.

Additionally, the Trigger.dev enforces a soft-cap of 2 minutes. Tasks that take longer than 2 minutes will be allowed to complete but we cannot guarentee that they won’t be retried erroneously or cause your run execution to be locked for up to 4 hours. This is because of a current limitation of Graphile Worker and our deployment platform.

Maximum Total Run Execution Duration

The Maximum Total Run Execution Duration is the maximum amount of time a single run can execute for. Runs are completed over 1 or more executions, depending on many factors like the number of tasks, the serverless function timeout, task errors and delays. The Trigger.dev measures the total time spent across all run executions and will cancel the run if it exceeds the limit.

Hobby plans have a limit of 15 minutes, Team plans have a limit of 2 hours, and Enterprise plans can set a custom limit.

Yielded Executions per Run

You can manually yield a run execution using io.yield(), which will exit the current run execution and schedule a new run execution to continue the run. You do this at most 100 times per run.