diff --git a/apps/sim/lib/execution/isolated-vm.ts b/apps/sim/lib/execution/isolated-vm.ts index c408a3c32..75567aed5 100644 --- a/apps/sim/lib/execution/isolated-vm.ts +++ b/apps/sim/lib/execution/isolated-vm.ts @@ -971,6 +971,7 @@ export async function executeInIsolatedVM( req.timeoutMs ) if (leaseAcquireResult === 'limit_exceeded') { + maybeCleanupOwner(ownerKey) return { result: null, stdout: '', @@ -982,6 +983,7 @@ export async function executeInIsolatedVM( } } if (leaseAcquireResult === 'unavailable') { + maybeCleanupOwner(ownerKey) return { result: null, stdout: '',