Skip to Content

Auto-Restart Configuration

Yaci-store includes an auto-restart feature that automatically handles recoverable sync errors, such as IntersectionNotFound errors that can occur after network disconnections and node rollbacks.

The auto-restart system uses an event-driven architecture to detect sync issues and restart the sync process with proper backpressure controls.

# Auto-restart configuration (enabled by default) store.auto-restart.enabled=true store.auto-restart.debounce-window-ms=30000 store.auto-restart.max-attempts=5 store.auto-restart.backoff-base-ms=5000 store.auto-restart.window-ms=600000

Configuration Options

  • store.auto-restart.enabled (default: true): Enable or disable the auto-restart feature
  • store.auto-restart.debounce-window-ms (default: 30000): Time window in milliseconds to prevent multiple restart attempts. If multiple restart events occur within this window, only the first one will be processed
  • store.auto-restart.max-attempts (default: 5): Maximum number of restart attempts allowed within a sliding window (~10 min). Once the limit is reached within the window, new restarts pause until the window elapses and then resume automatically — no manual restart required
  • store.auto-restart.backoff-base-ms (default: 5000): Base delay in milliseconds for exponential backoff between restart attempts
  • store.auto-restart.window-ms (default: 600000 = 10 min): Sliding window for the max-attempts limit. If no restart has been attempted for this long, the attempt counter resets so a later outage is treated as a fresh incident and retries resume automatically

How It Works

The auto-restart system automatically handles:

  • IntersectionNotFound errors: When the node can’t find a common intersection point after network issues
  • Health check failures: When the auto-recovery service detects sync problems

The system includes safeguards to prevent restart storms and enable automatic recovery:

  • Debouncing: Ignores rapid restart requests within the configured window
  • Exponential backoff: Increases delay between retry attempts (5s, 10s, 20s, 40s, 60s max)
  • Sliding-window rate limiting: Resets the retry counter if no restart has been attempted within ~10 minutes, allowing fresh restart attempts for new or recovered outages without manual intervention
  • Max-attempts per window: Within the sliding window, stops attempting restarts after reaching the configured limit to prevent excessive restart storms

The auto-restart feature is enabled by default since IntersectionNotFound is a valid scenario that should be handled automatically, especially in production environments.

Last updated on