{"record":{"id":"503c16e27130a1bf","repo":"languagetool-org/languagetool","slug":"sorry-the-content-at-url-is-too-big-this-pr","errorCode":null,"errorMessage":"Sorry, the content at + url + is too big - this process has been limited to + maxSizeBytes + bytes, but the content is + xml.length() + bytes","messagePattern":"Sorry, the content at \\+ url \\+ is too big - this process has been limited to \\+ maxSizeBytes \\+ bytes, but the content is \\+ xml\\.length\\(\\) \\+ bytes","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java","lineNumber":133,"sourceCode":"    disabledRuleIds = ruleIds;\n  }\n  \n  public List<String> getDisabledRuleIds() {\n    return disabledRuleIds;\n  }\n\n  public MarkupAwareWikipediaResult checkPage(URL url) throws IOException, PageNotFoundException {\n    return checkPage(url, null);\n  }\n\n  /**\n   * @since 2.6\n   */\n  public MarkupAwareWikipediaResult checkPage(URL url, ErrorMarker errorMarker) throws IOException, PageNotFoundException {\n    validateWikipediaUrl(url);\n    String xml = getMediaWikiContent(url);\n    if (xml.length() > maxSizeBytes) {\n      throw new RuntimeException(\"Sorry, the content at \" + url + \" is too big - this process has been limited to \" + maxSizeBytes +\n              \" bytes, but the content is \" + xml.length() + \" bytes\");\n    }\n    MediaWikiContent wikiContent = getRevisionContent(xml);\n    String content = wikiContent.getContent();\n    if (content.trim().isEmpty()) {\n      throw new PageNotFoundException(\"No content found at '\" + url + \"'\");\n    }\n    if (content.toLowerCase().contains(\"#redirect\")) {\n      throw new PageNotFoundException(\"No content but redirect found at '\" + url + \"'\");\n    }\n    return checkWikipediaMarkup(url, wikiContent, getLanguage(url), errorMarker);\n  }\n\n  MarkupAwareWikipediaResult checkWikipediaMarkup(URL url, MediaWikiContent wikiContent, Language language, ErrorMarker errorMarker) throws IOException {\n    SwebleWikipediaTextFilter filter = new SwebleWikipediaTextFilter();\n    PlainTextMapping mapping = filter.filter(wikiContent.getContent());\n    MultiThreadedJLanguageTool lt = getLanguageTool(language);\n    List<AppliedRuleMatch> appliedMatches = new ArrayList<>();","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/languagetool-org/languagetool/blob/2e990059ce67d5e2a0f7f7ca5d31160c6709df4b/languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java#L115-L151","documentation":"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.","triggerScenarios":"Thrown at languagetool-wikipedia/src/main/java/org/languagetool/dev/wikipedia/WikipediaQuickCheck.java:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase maxSizeBytes on the WikipediaQuickCheck if appropriate","Check a smaller/section-scoped version of the page","Skip oversized pages in batch runs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2e990059ce67d5e2a0f7f7ca5d31160c6709df4b","analyzedAt":"2026-09-06T09:20:17.015Z","contentChangedAt":"2026-09-06T09:20:17.015Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}