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

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 before giving up and requiring manual intervention
  • store.auto-restart.backoff-base-ms (default: 5000): Base delay in milliseconds for exponential backoff between restart attempts

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:

  • Debouncing: Ignores rapid restart requests within the configured window
  • Exponential backoff: Increases delay between retry attempts (5s, 10s, 20s, 40s, 60s max)
  • Retry limits: Stops trying after the maximum attempts are reached
  • Success tracking: Resets the retry counter after 5 minutes of stable sync

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