camoufox-guard

Monitors camoufox-bin process counts and kills orphaned browser processes to prevent OOM crashes.

8.5k|1.4k|Updated Apr 24, 2024
One-click install
npx skills add https://github.com/TeamWiseFlow/wiseflow --skill camoufox-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: camoufox-guard
Source: https://github.com/TeamWiseFlow/wiseflow/tree/main/crews/it-engineer/skills/camoufox-guard
Command: npx skills add https://github.com/TeamWiseFlow/wiseflow --skill camoufox-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Leaked camoufox-bin (anti-fingerprint Firefox) processes accumulate over time and exhaust system memory, causing repeated OOM crashes. This Skill acts as a safety net that periodically inspects running camoufox-bin processes, alerts when counts exceed thresholds, and terminates aged orphan processes before they crash the machine.

Core Features & Use Cases

  • Process Count Monitoring: Counts running camoufox-bin processes and reports OK status or warnings when the configurable threshold (default 6) is exceeded.
  • Orphan Process Cleanup: When the hard limit (default 12) is exceeded, kills the oldest orphaned processes older than 30 minutes, protecting active browser tasks.
  • Configurable Thresholds: All limits (warning threshold, hard limit, orphan age) can be overridden via environment variables.
  • Use Case: An IT engineer heartbeat job runs the guard script every cycle; when a browser daemon bug leaks camoufox-bin processes, the guard automatically cleans up orphans and suggests restarting the gateway if cleanup is insufficient.

Quick Start

Run the camoufox-guard script to check current camoufox-bin process counts and clean up any orphaned browser processes exceeding the limits.

Frequently Asked Questions about camoufox-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent camoufox-bin processes from causing OOM crashes?

Run the guard.sh script periodically, for example from a heartbeat job. It counts camoufox-bin processes, warns when the count exceeds the threshold (default 6), and kills orphaned processes older than 30 minutes when the hard limit (default 12) is exceeded.

How to kill orphaned Firefox or camoufox processes safely on Linux?

Use ps with etimes to list process ages, then send SIGTERM only to processes older than a safe age cutoff such as 30 minutes. This guard script implements exactly that approach, so active browser tasks under 30 minutes are never terminated.

Can I change the camoufox-guard process thresholds?

Yes, all thresholds are configurable via environment variables. Set CAMOUFOX_GUARD_THRESHOLD for the warning level, CAMOUFOX_GUARD_HARD_LIMIT for the kill trigger, and CAMOUFOX_GUARD_MAX_AGE_MIN for the orphan age cutoff in minutes.

Will the guard script kill my active browser automation tasks?

No, the script only terminates camoufox-bin processes older than 30 minutes. Active publishing or scraping tasks, which typically finish in under 30 minutes, are not affected by the cleanup logic.

What should I do if camoufox-bin processes remain above the hard limit after cleanup?

If processes persist above the hard limit after cleanup, the orphans are likely not aged enough to be killed safely. The script recommends restarting the gateway with systemctl --user restart openclaw-gateway to clear them.