Repository navigation
feat(platform): let operators size the crawler's document fetch cap - #3999
Merged
Merged
Conversation
The website crawler refused any document over a fixed 25 MiB with response_too_large, and a 26 MiB brochure PDF had no way in. The cap is now KNOWLEDGE_CRAWL_DOCUMENT_MAX_BYTES, read once at boot, with a default of 100 MiB — the platform's document-upload allowance, so what a member could upload can also be crawled. A value below 1 MiB or not a whole number is refused with a warning and reads the default. Every fetch is held in memory while its text is extracted, up to five sites at once; the environment reference says so. Docs en/de/fr (crawling, environment reference), .env.example and the manual automation register follow.
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The website crawler refused any linked document over a fixed 25 MiB (
DOCUMENT_MAX_BYTES) withresponse_too_large— "The page is too large to fetch." A 26.0 MiB brochure PDF on a crawled site hit it, and there was no way to change the number short of a code change.What
KNOWLEDGE_CRAWL_DOCUMENT_MAX_BYTES(new, optional) is the largest document — PDF, DOCX, XLSX, PPTX, ODT, in bytes — the crawler downloads and extracts; a larger one is still recorded on its page as too large. Read once at boot (crawlDocumentMaxBytes,backend/core/knowledge/crawl_limits.ts), the way the knowledge index repair reads its own byte limit..env.example, the manual automation register.Proof
crawl_limits.test.ts: unset/empty → default, a whole number at or above the floor is taken,abc/1.5/-1/0/1024/25MiBwarn and read the default.lint:manual, the CLI's platform-docs guard.