Problem
Running `next build` inside an Upstash Box fails with `EAGAIN` (resource temporarily unavailable) during static page generation. The build tries to spawn Node.js worker processes but the 2GB RAM limit prevents process creation.
Error
```
Warning: Failed to load system CA certificates off thread: resource temporarily unavailable
uncaughtException [Error: spawn /usr/local/bin/node EAGAIN] {
errno: -11,
code: 'EAGAIN',
syscall: 'spawn /usr/local/bin/node'
}
```
This happens during `Generating static pages` — Next.js spawns worker processes (1 per CPU core) and the box runs out of memory/process slots.
Environment
- `@upstash/box`: 0.1.28
- Runtime: node
- Next.js: 15.1.7
- Build tool: @opennextjs/cloudflare (which calls `next build` internally)
Workaround
Setting `NODE_OPTIONS="--max-old-space-size=1536"` before the build limits each Node.js process's heap and prevents the EAGAIN crash. But this is fragile — larger projects may still exceed 2GB total.
Request
- Documentation: What are the exact resource limits per box? (RAM, max processes, CPU cores, file descriptors)
- Larger box tiers: Is there a plan for 4GB or 8GB boxes? Build tools like Next.js, Vite, and Webpack are memory-intensive — 2GB is tight for production builds.
- Process limits: The EAGAIN error might also be caused by a process count limit (`ulimit -u`). What's the configured limit?
Steps to Reproduce
- Create a box with `runtime: "node"`
- Scaffold a Next.js project with 5+ pages
- Run `next build` (or `npx opennextjs-cloudflare build`)
- Build crashes during "Generating static pages" with EAGAIN
Problem
Running `next build` inside an Upstash Box fails with `EAGAIN` (resource temporarily unavailable) during static page generation. The build tries to spawn Node.js worker processes but the 2GB RAM limit prevents process creation.
Error
```
Warning: Failed to load system CA certificates off thread: resource temporarily unavailable
uncaughtException [Error: spawn /usr/local/bin/node EAGAIN] {
errno: -11,
code: 'EAGAIN',
syscall: 'spawn /usr/local/bin/node'
}
```
This happens during `Generating static pages` — Next.js spawns worker processes (1 per CPU core) and the box runs out of memory/process slots.
Environment
Workaround
Setting `NODE_OPTIONS="--max-old-space-size=1536"` before the build limits each Node.js process's heap and prevents the EAGAIN crash. But this is fragile — larger projects may still exceed 2GB total.
Request
Steps to Reproduce