Replies: 2 comments
-
|
The important bit in the log is: limit: 102400That means the running Nest/Express app is still using the default JSON body-parser limit of Check the env var inside the running container: docker compose -f docker-compose.dev.yml exec <service-name> printenv BODY_SIZE_LIMITIf it is missing, add it under the API service, then recreate: services:
<service-name>:
environment:
BODY_SIZE_LIMIT: 50mbdocker compose -f docker-compose.dev.yml up -d --build --force-recreateIf the env var is present but the limit is still import { json, urlencoded } from 'express';
const limit = process.env.BODY_SIZE_LIMIT || '50mb';
app.use(json({ limit }));
app.use(urlencoded({ limit, extended: true })); |
Beta Was this translation helpful? Give feedback.
-
|
Hi @clshinde — thanks for the detailed log, that pinpointed it. The line Root cause: Tracked in #831, fix up in #832. Workaround until that merges (drop into your environment:
# ... existing entries ...
- BODY_SIZE_LIMIT=${BODY_SIZE_LIMIT:-}Then Thanks again for reporting it — this one was easy to miss precisely because the env name was right there in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
i am running openwa from docker using docker-compose.dev.yml, in development currently. I am facing the issue when i upload a base64, (a random pdf) about original=1154487 bytes, base64=1539316 bytes,
Response body (_send_media): {"statusCode":413,"message":"request entity too large"}
2026-06-29 23:49:54,610 ERROR Send media failed: 413 Client Error: Payload Too Large for url: http://localhost:2785/api/sessions/9bc73940-2a14-4d30-b0f8-8cc188b808c3/messages/send-document
In docker logs, i get the following,
[Nest] 7 - 06/29/2026, 6:19:54 PM ERROR [ExceptionsHandler] PayloadTooLargeError: request entity too large
at readStream (/app/node_modules/raw-body/index.js:163:17)
at getRawBody (/app/node_modules/raw-body/index.js:116:12)
at read (/app/node_modules/body-parser/lib/read.js:113:3)
at jsonParser (/app/node_modules/body-parser/lib/types/json.js:88:5)
at Layer.handleRequest (/app/node_modules/router/lib/layer.js:152:17)
at trimPrefix (/app/node_modules/router/index.js:342:13)
at /app/node_modules/router/index.js:297:9
at processParams (/app/node_modules/router/index.js:582:12)
at next (/app/node_modules/router/index.js:291:5)
at cors (/app/node_modules/cors/lib/index.js:188:7)
at /app/node_modules/cors/lib/index.js:224:17
at origin (/app/dist/main.js:122:24)
at /app/node_modules/cors/lib/index.js:219:13
at optionsCallback (/app/node_modules/cors/lib/index.js:199:9)
at corsMiddleware (/app/node_modules/cors/lib/index.js:204:7)
at Layer.handleRequest (/app/node_modules/router/lib/layer.js:152:17) {
expected: 1539459,
length: 1539459,
limit: 102400,
type: 'entity.too.large'
}
i have used - BODY_SIZE_LIMIT=50mb in docker-compose.dev.yml and recreated the docker, still not working. Any help would be welcome.
Beta Was this translation helpful? Give feedback.
All reactions