Skip to content
Discussion options

You must be logged in to vote

Good question. Right now there's no built-in per-worker memory monitoring — this is a gap I'm aware of.

What's available today

Process-wide memory (embedded mode)

# Health endpoint shows total process memory
curl http://localhost:6790/health
# Returns: { memory: { heapUsed: 45.2, heapTotal: 67.1, rss: 120.5 } } (in MB)

# Detailed heap breakdown
curl http://localhost:6790/heapstats

But this shows the entire process memory, not per-worker.

SandboxedWorker stats

const stats = worker.getStats();
// { total: 3, busy: 2, idle: 1, restarts: 0 }

This gives you thread counts and restart info, but not memory usage.

maxMemory behavior

The maxMemory option controls Bun's smol mode:

  • maxMemory <= 64:…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arthurvanl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants