---
title: "Limits"
---

## General Limits

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

|                                                                         | Hobby     | Team        | Self-hosted / Enterprise  |
| ----------------------------------------------------------------------- | --------- | ----------- | ------------------------- |
| Team Members                                                            | Up to 2   | Up to 5     | Custom                    |
| Projects                                                                | 1         | Up to 5     | Custom                    |
| Jobs per Project                                                        | Up to 10  | Up to 50    | Custom                    |
| Runs (per Month)                                                        | 5,000     | Up to 1m    | Custom                    |
| Run Log retention                                                       | 24 hours  | 7 days      | Custom                    |
| Connected Integrations                                                  | Up to 50  | Up to 1000  | Custom                    |
| Task Output Size                                                        | 3MB       | 3MB         | 3MB                       |
| [Tasks per Run](#tasks-per-runs)                                        | Up to 250 | Up to 1000  | Custom                    |
| [Concurrent Run Executions](#concurrent-run-executions)                 | Up to 10  | Up to 100   | Custom                    |
| [Maximum Task Duration](#maximum-task-duration)                         | < 2m      | < 2m        | < Deployment Grace Period |
| [Maximum Run Execution Duration](#maximum-total-run-execution-duration) | up to 15m | up to 2 hrs | Custom                    |
| [Yielded Executions per Run](#yielded-executions-per-run)               | Up to 100 | Up to 100   | Custom                    |

### 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()](/sdk/io/runtask):

```ts
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:

- [io.wait()](/sdk/io/wait)
- [io.sendEvent()](/sdk/io/sendevent)
- [io.backgroundFetch()](/sdk/io/backgroundfetch)
- [io.logger](/sdk/io/logger)

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.:

```ts
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 <hello@email.trigger.dev>",
    });
  },
});
```

Anything that shows up as an item on the [Run Log](/documentation/guides/viewing-runs#run-page) is a Task:

![Task](/images/task.png)

### 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()](/sdk/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:

```ts
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:

```ts
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:

```json
{
  "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](/documentation/guides/platforms/nextjs#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](https://github.com/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.
