Applies to:
- Plan:
- Deployment:
Summary
Goal: Configure UI experiment execution timeout for self-hosted Kubernetes deployments. Features:CODE_FUNCTION_EXECUTION_TIMEOUT_S environment variable, k8s ingress and load balancer timeout alignment.
How UI experiments execute
The execution environment depends on your deployment type:| Deployment | Execution environment | Timeout |
|---|---|---|
| Braintrust-hosted | AWS Lambda | 15 min (hard limit) |
| Self-hosted on AWS | AWS Lambda | 15 min (hard limit) |
| Self-hosted on GCP/Azure (k8s) | In-process, data plane | Configurable |
Configuration steps
Step 1: Set the execution timeout
In your data plane deployment, set the environment variable:900 (15 minutes). Set this to any value your workload requires.
Step 2: Align infrastructure-level HTTP timeouts
IfCODE_FUNCTION_EXECUTION_TIMEOUT_S exceeds 900 seconds, update your infrastructure timeouts to match. If these are lower than the execution timeout, the HTTP connection will drop before the function completes.
Update the following to be equal to or greater than CODE_FUNCTION_EXECUTION_TIMEOUT_S:
- k8s ingress — set
proxy-read-timeoutandproxy-send-timeoutannotations - Load balancer — set the idle timeout on your cloud load balancer