Skip to content

Commit 981cf3b

Browse files
hkiratclaude
andcommitted
fix: increase sandbox resources to 4 CPUs and 8GB RAM
Default 2 cores was hitting 97% CPU on most projects. Bump both session and setup sandboxes to 4 CPUs + 8GB RAM. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 61f1277 commit 981cf3b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

apps/server/src/services/sandbox.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export async function startSessionSandbox(
3737
// Create sandbox from the project's built template
3838
const sandbox = await Sandbox.create(project.e2bTemplateId, {
3939
timeoutMs: project.maxSessionDurationMin * 60 * 1000,
40+
cpuCount: 4,
41+
memoryMb: 8192,
4042
envs: {
4143
GITHUB_TOKEN: githubToken,
4244
...(env.OPENAI_API_KEY ? { OPENAI_API_KEY: env.OPENAI_API_KEY } : {}),

apps/server/src/services/setup.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export async function startSetupSession(projectId: string, userId: string): Prom
310310
(async () => {
311311
try {
312312
await persistState(projectId, { status: "Creating sandbox..." });
313-
const sandbox = await Sandbox.create({ timeoutMs: 30 * 60_000 });
313+
const sandbox = await Sandbox.create({ timeoutMs: 30 * 60_000, cpuCount: 4, memoryMb: 8192 });
314314
sandboxCache.set(projectId, sandbox);
315315
scheduleSandboxCleanup(projectId);
316316
await persistState(projectId, { sandboxId: sandbox.sandboxId });

0 commit comments

Comments
 (0)