ducktors/turborepo-remote-cache

Add an option to increase bodyLimit.

SavelevMatthew opened this issue · 1 comments

Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the missing discussion label.

🐛 Bug Report

Some of generated artifacts cannot be stored because of body size limit. Here's the server log:

{"severity":"ERROR","level":50,"time":1700542082033,"pid":8,"hostname":"126f24f5fcfd","reqId":"dEQBFoUGTuGubhl7lyAaDA-11","name":"FastifyError","code":"FST_ERR_CTP_BODY_TOO_LARGE","message":"Request body is too large","statusCode":413,"stack":"FastifyError: Request body is too large\n    at rawBody (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/contentTypeParser.js:206:16)\n    at ContentTypeParser.run (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/contentTypeParser.js:166:5)\n    at handleRequest (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/handleRequest.js:41:33)\n    at runPreParsing (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/route.js:530:5)\n    at next (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/hooks.js:168:7)\n    at handleResolve (/home/app/node/node_modules/.pnpm/fastify@4.12.0/node_modules/fastify/lib/hooks.js:185:5)","type":"Error"}

To Reproduce

Steps to reproduce the behavior:

  1. Run cache server via any possible way (locally with Docker in my case) and any provider (local in my case)
  2. Try to build some turbo run build commands

Paste your code here:

TURBO_TEAM=my-team TURBO_TOKEN=token TURBO_API=http://0.0.0.0:3000 turbo run build --no-daemon --remote-only --force

Expected behavior

All artifacts are saved.

My bad, found BODY_LIMIT variable in docs. Tuned it a bit, now everything is working fine 🔥