languagetool-org/languagetool · error · RuntimeException

Sorry, the content at + url + is too big - this process has

Error message

Sorry, the content at + url + is too big - this process has been limited to + maxSizeBytes + bytes, but the content is + xml.length() + bytes

What it means

Size guard in WikipediaQuickCheck.checkPage: the MediaWiki API content fetched for the URL exceeds this instance's maxSizeBytes limit, so checking it would consume too much memory/time.

Source

Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:133

    disabledRuleIds = ruleIds;
  }
  
  public List<String> getDisabledRuleIds() {
    return disabledRuleIds;
  }

  public MarkupAwareWikipediaResult checkPage(URL url) throws IOException, PageNotFoundException {
    return checkPage(url, null);
  }

  /**
   * @since 2.6
   */
  public MarkupAwareWikipediaResult checkPage(URL url, ErrorMarker errorMarker) throws IOException, PageNotFoundException {
    validateWikipediaUrl(url);
    String xml = getMediaWikiContent(url);
    if (xml.length() > maxSizeBytes) {
      throw new RuntimeException("Sorry, the content at " + url + " is too big - this process has been limited to " + maxSizeBytes +
              " bytes, but the content is " + xml.length() + " bytes");
    }
    MediaWikiContent wikiContent = getRevisionContent(xml);
    String content = wikiContent.getContent();
    if (content.trim().isEmpty()) {
      throw new PageNotFoundException("No content found at '" + url + "'");
    }
    if (content.toLowerCase().contains("#redirect")) {
      throw new PageNotFoundException("No content but redirect found at '" + url + "'");
    }
    return checkWikipediaMarkup(url, wikiContent, getLanguage(url), errorMarker);
  }

  MarkupAwareWikipediaResult checkWikipediaMarkup(URL url, MediaWikiContent wikiContent, Language language, ErrorMarker errorMarker) throws IOException {
    SwebleWikipediaTextFilter filter = new SwebleWikipediaTextFilter();
    PlainTextMapping mapping = filter.filter(wikiContent.getContent());
    MultiThreadedJLanguageTool lt = getLanguageTool(language);
    List<AppliedRuleMatch> appliedMatches = new ArrayList<>();

View on GitHub (pinned to 2e990059ce)

Solutions

  1. Increase maxSizeBytes on the WikipediaQuickCheck if appropriate
  2. Check a smaller/section-scoped version of the page
  3. Skip oversized pages in batch runs
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:133 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06). Data as JSON: /api/errors/503c16e27130a1bf. Report an issue: GitHub.