BoringtecVN

Crash Recovery & Circuit Breaker

Auto-Restart

When Auto-Restart is enabled for a service, WinWraper automatically restarts it the moment it stops unexpectedly (crashes).

You don't need to do anything, WinWraper handles it completely.

Enabling Auto-Restart

In the Service List, find the Auto-Restart column on the service's row and click the toggle to turn it on. There's no separate dialog, the change applies immediately.

💡Tip

Enable Auto-Restart for all production services to ensure they stay running, even when an unexpected error occurs.


Rapid Exit Detection

If a service exits too quickly right after starting (typically within the first few seconds), WinWraper detects this as a configuration error or missing dependency, not a regular crash.

WinWraper will:

  1. Stop restarting immediately.
  2. Show a warning dialog with the service's error output (stderr).

Common causes:

  • Incorrect path to the executable
  • Missing libraries or dependencies
  • Syntax error in the script

Circuit Breaker

The Circuit Breaker is a protection mechanism: if a service crashes too many times within a short time window, WinWraper breaks the restart loop and sets the status to ⛔ Circuit Open.

AUTOPLAY DEMOCrash lifecycle → auto-restart → Circuit Open

my-backend

node index.js

Crash0/5
● Running

Timeline

Why do we need a Circuit Breaker?

Without it, a continuously failing service would:

  • Waste CPU and RAM needlessly
  • Write enormous log files
  • Obscure the real problem that needs fixing

The Circuit Breaker stops the loop and alerts you, rather than restarting indefinitely.

When does the Circuit Breaker trip?

  • The service crashes 5 times (default) within 60 seconds.
  • After the 5th crash, the status changes to ⛔ Circuit Open.
  • The threshold can be adjusted in the advanced settings (see Settings & Configuration).

How to reset the Circuit Breaker

  1. Find and fix the root cause (check the log in Service Watcher).
  2. Right-click the service → Restart.
  3. The service starts normally and the circuit is reset.

⚠️Warning

Don't just restart without fixing the root cause, the Circuit Breaker will trip again immediately.


Tracking crash counts

In the Service List, the Crashes column shows:

  • Crashes in the current run / Total lifetime crashes

For example: 2/15 means it has crashed 2 times in this run, and 15 times in total since it was added.


Finding the crash cause

When a service crashes, error details are recorded in the Service Watcher. See: Service Watcher


Next: Resource Metrics →