Skip to main content

Retry Limit Configuration

Introduction

The following system properties and JMX bean are provided to allow the user to control when and how often retrys occur for storage transactions.

System Properties

The following system properties can be used to control when and how often a retry occurs:

nexus.tx.retry.limit=8            # maximum times a transaction can retry
nexus.tx.retry.minSlots=2         # minimum number of backoff slots
nexus.tx.retry.maxSlots=256       # maximum number of backoff slots
nexus.tx.retry.minorDelay=10ms    # per-slot delay if it's a minor exception
nexus.tx.retry.majorDelay=100ms   # per-slot delay if it's a major exception

# comma-separated list of exceptions to treat as "major"
nexus.tx.retry.majorExceptionFilter=\
  java.io.IOException,org.sonatype.nexus.repository.storage.MissingBlobException

# comma-separated list of exceptions to treat as "noisy" - these exceptions won't contribute to the excessive retry metrics
nexus.tx.retry.noisyExceptionFilter=\
  org.sonatype.nexus.repository.browse.internal.orient.BrowseNodeCollisionException

IOExceptions and MissingBlobExceptions are treated as major exceptions which result in longer backoff delays before retrying. This is because these exceptions are often related to slower (networked) storage which works best with a longer delay before retrying. When running in HA-C various distributed exceptions are also listed as major for the same reason.

RetryControllerBean

28345110.png

This JMX bean can be used to tune the retry settings at runtime without rebooting.

Attributes

RetryLimit

28345109.png

The maximum number of times a transaction can retry.

MinSlots

28345111.png

The minimum number of backoff slots.

MaxSlots

28345112.png

The maximum number of backoff slots.

MinorDelayMillis

28345113.png

The per-slot delay if it's a minor exception.

MajorDelayMillis

28345114.png

The per-slot delay if it's a major exception.

MajorExceptionFilter

28345115.png

A comma-separated list of exceptions (fully qualified names) to treat as "major".

IOExceptions and MissingBlobExceptions are treated as major exceptions which result in longer backoff delays before retrying. This is because these exceptions are often related to slower (networked) storage which works best with a longer delay before retrying. When running in HA-C various distributed exceptions are also listed as major for the same reason.

References