Skip to content

fix(deploy): raise donna-web BODY_SIZE_LIMIT so KB uploads >0.5MB work - #123

Open
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:fix/body-size-limit
Open

fix(deploy): raise donna-web BODY_SIZE_LIMIT so KB uploads >0.5MB work#123
sergiomaldo wants to merge 1 commit into
LegalQuants:mainfrom
sergiomaldo:fix/body-size-limit

Conversation

@sergiomaldo

Copy link
Copy Markdown

Problem

SvelteKit adapter-node defaults BODY_SIZE_LIMIT to 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 bytes in 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 config and 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant