fix(deploy): raise donna-web BODY_SIZE_LIMIT so KB uploads >0.5MB work - #123
Open
sergiomaldo wants to merge 1 commit into
Open
fix(deploy): raise donna-web BODY_SIZE_LIMIT so KB uploads >0.5MB work#123sergiomaldo wants to merge 1 commit into
sergiomaldo wants to merge 1 commit into
Conversation
SvelteKit adapter-node caps request bodies at 512K by default, so any KB upload over 0.5MB through donna-web died with an opaque 500 before ever reaching the api. Set BODY_SIZE_LIMIT (default 512M, operator-tunable via DONNA_WEB_BODY_SIZE_LIMIT) on the release-compose donna-web service, document the knob in .env.example, and pin both with a vitest guard so a release-compose re-sync cannot silently drop it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
SvelteKit adapter-node defaults
BODY_SIZE_LIMITto 512K. KB uploads proxy through donna-web, so any PDF over ~0.5MB fails with an opaque 500 (Content-length of N exceeds limit of 524288 bytesin donna-web logs; nothing reaches the api). Most legal source PDFs exceed this — the first document we tried (a Federal Register rule, 759KB) failed.Fix
BODY_SIZE_LIMIT: ${DONNA_WEB_BODY_SIZE_LIMIT:-512M}on the donna-web service in docker-compose.release.yml, documented in .env.example, plus a vitest guard pinning both (the release compose is hand-maintained, so a re-sync could silently drop it).Testing
npm run check / lint green; vitest suite passing incl. the new guard. Verified interpolation via
docker compose configand live on our deployment.Found operating a production self-hosted legal deployment (law firm running Donna v0.6.2 fully local).
🤖 Generated with Claude Code