Jackett/Jackett · error · ExceptionWithConfigData

HTTP 500 Internal Server Error

Error message

HTTP 500 Internal Server Error

What it means

Thrown by MejorTorrent.PerformQueryNewest as an ExceptionWithConfigData when the newest-torrents page (SiteLink + NewTorrentsUrl) returns HTTP 500 Internal Server Error. The code treats 500 distinctly from other non-OK statuses because MejorTorrent frequently returns transient 500s; wrapping it in ExceptionWithConfigData signals a likely site-side/config-adjacent problem rather than a permanent failure.

Source

Thrown at src/Jackett.Common/Indexers/Definitions/MejorTorrent.cs:154

        }

        public override async Task<byte[]> Download(Uri link)
        {
            var downloadUrl = link.ToString();
            var content = await base.Download(new Uri(downloadUrl));
            return content;
        }

        private async Task<List<ReleaseInfo>> PerformQueryNewest(TorznabQuery query)
        {
            var releases = new List<ReleaseInfo>();
            var url = SiteLink + NewTorrentsUrl;
            var result = await RequestWithCookiesAsync(url);
            if (result.Status != HttpStatusCode.OK)
            {
                if (result.Status == HttpStatusCode.InternalServerError)
                {
                    throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
                }
                else
                {
                    throw new ExceptionWithConfigData(result.ContentString, configData);
                }
            }
            try
            {
                var searchResultParser = new HtmlParser();
                using var doc = searchResultParser.ParseDocument(result.ContentString);

                var container = doc.QuerySelector(".gap-y-3 > div:nth-child(1) > div:nth-child(1)");
                var parsedDetailsLink = new List<string>();
                string rowTitle = null;
                string rowDetailsLink = null;
                string rowPublishDate = null;
                string rowQuality = null;

View on GitHub (pinned to adff194147)

Solutions

  1. Retry the search after a few minutes — MejorTorrent 500s are typically transient.
  2. If it persists, open the newest torrents URL in a browser to confirm the site itself is erroring.
  3. Reduce search frequency to avoid hammering an overloaded server.
  4. Check the MejorTorrent status/social channels for announced downtime.

Example fix

// before
if (result.Status == HttpStatusCode.InternalServerError)
{
    throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);
}

// after — retry once before surfacing, since 500s are transient
if (result.Status == HttpStatusCode.InternalServerError)
{
    logger.Warn("MejorTorrent newest returned 500, retrying once");
    result = await RequestWithCookiesAsync(url);
    if (result.Status == HttpStatusCode.InternalServerError)
        throw new ExceptionWithConfigData("HTTP 500 Internal Server Error from MejorTorrent", configData);
}
Defensive patterns

Strategy: retry

Validate before calling

// Optional pre-flight: only configure if the site is responding
var preflight = await RequestWithCookiesAsync(SiteLink + NewTorrentsUrl);
if (preflight.Status == HttpStatusCode.InternalServerError)
    logger.Warn("MejorTorrent is returning 500; consider deferring configuration.");

Try / catch

HttpResponseResult result;
int attempts = 0;
do
{
    result = await RequestWithCookiesAsync(url);
    if (result.Status == HttpStatusCode.InternalServerError && attempts < 1)
        logger.Warn("MejorTorrent 500, retrying ({0})", attempts);
} while (result.Status == HttpStatusCode.InternalServerError && ++attempts < 2);

if (result.Status == HttpStatusCode.InternalServerError)
    throw new ExceptionWithConfigData("HTTP 500 Internal Server Error", configData);

Prevention

When it happens

Trigger: RequestWithCookiesAsync to the newest torrents URL responds with status 500. The specific branch `result.Status == HttpStatusCode.InternalServerError` matches and throws this message.

Common situations: MejorTorrent server overload during peak hours; backend database error on the site; a bad query/cookie triggering a server-side exception; the site is mid-deployment.

Understand the failure class

Related errors


AI-assisted analysis of Jackett/Jackett@adff194147 (2026-08-13). Data as JSON: /api/errors/de1cb46e9435da58. Report an issue: GitHub.