Sonarr/Sonarr · warning · RequestLimitReachedException

API limit reached

Error message

API limit reached

What it means

Thrown by NewznabRssParser.CheckError when the Newznab XML error element's description is exactly 'Request limit reached'. This is Newznab's standard rate-limiting message. The exception type is RequestLimitReachedException, which the HttpIndexerBase pipeline handles specially — it records a failure with an exponential backoff and temporarily disables the indexer until the retry time.

Source

Thrown at src/NzbDrone.Core/Indexers/Newznab/NewznabRssParser.cs:47

                return;
            }

            var code = Convert.ToInt32(error.Attribute("code").Value);
            var errorMessage = error.Attribute("description").Value;

            if (code >= 100 && code <= 199)
            {
                throw new ApiKeyException(errorMessage);
            }

            if (!indexerResponse.Request.Url.FullUri.Contains("apikey=") && (errorMessage == "Missing parameter" || errorMessage.Contains("apikey")))
            {
                throw new ApiKeyException("Indexer requires an API key");
            }

            if (errorMessage == "Request limit reached")
            {
                throw new RequestLimitReachedException("API limit reached");
            }

            throw new NewznabException(indexerResponse, errorMessage);
        }

        protected override bool PreProcess(IndexerResponse indexerResponse)
        {
            if (indexerResponse.HttpResponse.HasHttpError &&
                (indexerResponse.HttpResponse.Headers.ContentType == null || !indexerResponse.HttpResponse.Headers.ContentType.Contains("xml")))
            {
                base.PreProcess(indexerResponse);
            }

            var xdoc = LoadXmlDocument(indexerResponse);

            CheckError(xdoc, indexerResponse);

            return true;

View on GitHub (pinned to da2284d7ea)

Solutions

  1. Wait for the rate limit window to reset — the indexer is auto-disabled with backoff, check the indexer status panel for the retry time.
  2. Increase the RSS sync interval in Sonarr settings to reduce request frequency.
  3. If multiple apps share the same API key, either get separate keys or coordinate request timing.
  4. Upgrade to a higher API tier on the Newznab provider if available (VIP/donor often have higher limits).
  5. Reduce the number of concurrent or manual searches.

Example fix

// before — standard RequestLimitReachedException for 'Request limit reached'
if (errorMessage == "Request limit reached")
{
    throw new RequestLimitReachedException("API limit reached");
}

// after — parse Retry-After or rate-limit headers for precise backoff
// var retryAfter = indexerResponse.HttpResponse.Headers.GetValueOrNull("Retry-After");
// var retryDelay = retryAfter != null
//     ? TimeSpan.FromSeconds(int.Parse(retryAfter))
//     : TimeSpan.FromMinutes(15);
// throw new RequestLimitReachedException(retryDelay, "Newznab API limit reached, retry after {0}", retryDelay);
Defensive patterns

Strategy: retry

Validate before calling

// Before fetching, check if the indexer is in a rate-limit cooldown
var blockedProviders = _indexerStatusService.GetBlockedProviders();
if (blockedProviders.TryGetValue(indexer.Definition.Id, out var status))
{
    var disabledTill = status.DisabledTill;
    if (disabledTill.HasValue && disabledTill.Value > DateTime.UtcNow)
    {
        _logger.Debug("Skipping indexer {0}, rate-limited until {1}", indexer.Name, disabledTill);
        return Array.Empty<ReleaseInfo>();
    }
}

Try / catch

// RequestLimitReachedException is caught by HttpIndexerBase, which records
// a failure with exponential backoff and temporarily disables the indexer.
// For custom callers:
try
{
    return await FetchPage(request, parser);
}
catch (RequestLimitReachedException ex)
{
    var retryAfter = ex.RetryAfter != TimeSpan.Zero ? ex.RetryAfter : TimeSpan.FromMinutes(15);
    _logger.Warn("Newznab rate-limited, will retry after {0}", retryAfter);
    await Task.Delay(retryAfter);
    return Array.Empty<ReleaseInfo>(); // skip this cycle
}

Prevention

When it happens

Trigger: A Newznab API request returns an XML error element with description 'Request limit reached', indicating the indexer's per-user or per-IP API rate limit has been exceeded. Newznab indexers typically enforce limits on requests per day or per hour.

Common situations: Sonarr polling too frequently (RSS sync interval too short); multiple applications (Sonarr, Radarr, Lidarr) sharing the same Newznab API key and collectively exceeding the limit; the Newznab provider reduced its API quota; aggressive manual searches; a bug causing duplicate requests.

Related errors


AI-assisted analysis of Sonarr/Sonarr@da2284d7ea (2026-08-13). Data as JSON: /api/errors/8ebbddca1ec2a1db. Report an issue: GitHub.