Skip to content

Commit 0d3e827

Browse files
Add executor pool configuration documentation
Documents environment variables for code interpreter executor pool configuration and removal of MAX_SIZE limits in version 0.3.4. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ccd1240 commit 0d3e827

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/content/docs/sandbox/configuration/environment-variables.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,32 @@ await sandbox.exec("node app.js", {
239239
});
240240
```
241241

242+
## Code interpreter executor pool configuration
243+
244+
The code interpreter maintains a pool of executor processes for running Python, JavaScript, and TypeScript code. Minimum pool sizes can be configured via environment variables in your Dockerfile:
245+
246+
```dockerfile
247+
# Minimum number of warm executor processes (default: 3 for each language)
248+
ENV PYTHON_POOL_MIN_SIZE=3
249+
ENV JAVASCRIPT_POOL_MIN_SIZE=3
250+
ENV TYPESCRIPT_POOL_MIN_SIZE=3
251+
```
252+
253+
The pool scales organically based on demand. There are no maximum pool size limits - new executors are created as needed to handle concurrent code execution contexts.
254+
255+
:::note[Removed configuration options]
256+
Prior to version 0.3.4, the following environment variables were available but have been removed:
257+
- `PYTHON_POOL_MAX_SIZE`
258+
- `JAVASCRIPT_POOL_MAX_SIZE`
259+
- `TYPESCRIPT_POOL_MAX_SIZE`
260+
261+
The pool now scales without artificial limits to ensure reliable execution across any number of concurrent code contexts.
262+
:::
263+
242264
## Related resources
243265

244266
- [Wrangler configuration](/sandbox/configuration/wrangler/) - Setting Worker-level environment
245267
- [Secrets](/workers/configuration/secrets/) - Managing sensitive data
246268
- [Sessions API](/sandbox/api/sessions/) - Session-level environment variables
269+
- [Code Interpreter API](/sandbox/api/interpreter/) - Understanding code contexts
247270
- [Security model](/sandbox/concepts/security/) - Understanding data isolation

0 commit comments

Comments
 (0)