Skip to content

[Bug] Backend PID usage at 80% - sandbox instability, need root cause fix #742

Description

@Clawiee

Tags: bug, performance, sandbox, resource-management
Quality Rating: ⭐ 9/10


Reporter: xiaoan

Description

The backend PID usage rate is currently at 80% (400/500 processes). This high PID consumption causes the sandbox environment to become unusable.

Background

This issue was previously reported, and a temporary fix was implemented in a later version by increasing the process limit from 300 to 500. However, this is only a band-aid solution that delays the problem rather than addressing the root cause.

Current Status

  • PID Usage: 80%
  • Current Processes: 400 / 500
  • Impact: Sandbox becomes unusable when PID limit is approached

Expected Behavior

The system should properly manage and release PID resources, preventing accumulation that leads to exhaustion. The root cause of PID leaks or inefficient process management should be identified and fixed.

Actual Behavior

PID usage continues to climb toward the limit, requiring manual intervention or causing sandbox failures. The previous fix (increasing limit from 300→500) only postponed the issue.

Suggested Investigation Areas

  1. Process lifecycle management - ensure processes are properly terminated after use
  2. PID leaks in long-running operations
  3. Process pooling efficiency
  4. Auto-cleanup mechanisms for orphaned processes

Additional Context

This is a recurring infrastructure issue that affects sandbox stability and developer experience. A permanent solution is needed rather than continuously increasing limits.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions