ruvnet/ruflo · error

Resource limits exceeded: ${check.violations.join(', ')}

Error message

Resource limits exceeded: ${check.violations.join(', ')}

What it means

ResourceMonitor.enforce checked process.memoryUsage() before running the wrapped function and found heap usage above the configured maxMemoryMB. The violations list names the exceeded limit(s); the operation is aborted up front rather than executing under memory pressure.

Source

Thrown at v3/@claude-flow/plugins/src/security/index.ts:541

    check(): { ok: boolean; violations: string[] } {
      const violations: string[] = [];
      const memUsage = process.memoryUsage();
      const memMB = memUsage.heapUsed / 1024 / 1024;

      if (memMB > config.maxMemoryMB) {
        violations.push(`Memory usage ${memMB.toFixed(1)}MB exceeds limit ${config.maxMemoryMB}MB`);
      }

      return {
        ok: violations.length === 0,
        violations,
      };
    },

    async enforce<T>(fn: () => Promise<T>): Promise<T> {
      const check = this.check();
      if (!check.ok) {
        throw new Error(`Resource limits exceeded: ${check.violations.join(', ')}`);
      }

      return Promise.race([
        fn(),
        new Promise<never>((_, reject) =>
          setTimeout(() => reject(new Error('Execution time limit exceeded')), config.maxExecutionTime)
        ),
      ]);
    },
  };
}

// ============================================================================
// Export All
// ============================================================================

export const Security = {
  // Validation

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Reduce the plugin's resource usage (batch work, stream large data).
  2. Raise the relevant resource limits in the security configuration if the workload is legitimate.
  3. Inspect check.violations to identify which specific limit was hit.
Defensive patterns

Strategy: validation

When it happens

Trigger: A plugin operation exceeds one or more configured resource limits (memory, time, size, etc.).

Common situations: Heavy plugin workload hitting sandbox caps, or limits configured too tightly.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/08595ea22dc35e02. Report an issue: GitHub.