From 1479445a3b06b5190f44b00ee3873bf2e2029504 Mon Sep 17 00:00:00 2001 From: haru0017 Date: Wed, 17 Jun 2026 15:03:45 +0900 Subject: [PATCH] add TailorDB select and fetch response body size limits --- docs/reference/platform/platform-limits.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/reference/platform/platform-limits.md b/docs/reference/platform/platform-limits.md index 73cff69..b09ee6c 100644 --- a/docs/reference/platform/platform-limits.md +++ b/docs/reference/platform/platform-limits.md @@ -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 @@ -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: @@ -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.