Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/reference/platform/platform-limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Platform limits are enforced across different services in the Tailor Platform to
| Workflow | Per-Workflow Concurrent Executions | 20 executions | Max concurrent executions of a single workflow | Pending executions remain in `PENDING` status until running executions drop below the cap |
| Function | Memory | 32 MB | Max memory available to a Function execution | Execution terminated with `Memory limit exceeded` error if usage exceeds 32 MB |
| JobFunction | Memory | 256 MB | Max memory available to a JobFunction execution | Execution terminated with `Memory limit exceeded` error if usage exceeds 256 MB |
| Function | TailorDB Select Result Size | 128 MB | Max size of data returned from a TailorDB select query | Query fails if the result set exceeds 128 MB |
| Function | Fetch Response Body Size | 10 MB | Max size of a response body when using buffered methods like `.text()` or `.json()` | Request fails if the response body exceeds 10 MB |

## Recursive Call Detection

Expand Down Expand Up @@ -66,6 +68,16 @@ The Tailor Platform enforces fixed memory limits on function executions to preve

When an execution exceeds its memory limit, it is terminated and returns a `Memory limit exceeded` error indicating the memory used and the limit (for example, `used 50 MB of 32 MB limit`).

## TailorDB Select Result Size Limit

When a Function or JobFunction queries TailorDB data using `select`, the total size of the result set is limited to 128 MB. If the result exceeds this limit, the query fails with an error. Use pagination, column filtering, or query filters to keep result sizes within the limit.

## Fetch Response Body Size Limit

When a Function or JobFunction uses `fetch()`, buffered methods such as `response.text()` and `response.json()` are limited to 10 MB. If the response body exceeds this limit, the method fails with an error.

This limit does not apply to streaming methods (`response.body.getReader()`, `response.body.pipeTo()`, `response.body.pipeThrough()`). Use these to handle responses larger than 10 MB.

## Best Practices

When working within platform limits, consider the following best practices:
Expand All @@ -83,3 +95,7 @@ When working within platform limits, consider the following best practices:
1. **Design for memory limits**: Process large datasets in batches or stream them rather than loading everything into memory at once.

1. **Choose JobFunction for memory-intensive workloads**: If your workload exceeds the 32 MB Function limit, use JobFunction (256 MB) instead.

1. **Paginate large TailorDB queries**: When querying large datasets from TailorDB, use pagination and column filtering to keep result sizes within the 128 MB limit.

1. **Use streaming for large HTTP responses**: When fetching large external resources, use `response.body.getReader()` instead of `.text()` or `.json()` to avoid the 10 MB buffered response body limit.
Loading