Hello I am using webhook as a trigger, but whenever I post something larger than 100kb to the endpoint, it always return below error message, the http status code is 413 PayloadTooLarge. Not sure if there is anything wrong in setting or config.
PayloadTooLargeError: request entity too large
at readStream (/usr/local/lib/node_modules/n8n/node_modules/raw-body/index.js:155:17)
at getRawBody (/usr/local/lib/node_modules/n8n/node_modules/raw-body/index.js:108:12)
at read (/usr/local/lib/node_modules/n8n/node_modules/body-parser/lib/read.js:77:3)
at urlencodedParser (/usr/local/lib/node_modules/n8n/node_modules/body-parser/lib/types/urlencoded.js:116:5)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:317:13)
at /usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:335:12)
at next (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:275:10)
at /usr/local/lib/node_modules/n8n/node_modules/connect-history-api-fallback/lib/index.js:18:14
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:317:13)
at /usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:335:12)
at next (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:275:10)
at textParser (/usr/local/lib/node_modules/n8n/node_modules/body-parser/lib/types/text.js:78:7)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:317:13)
at /usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:335:12)
at next (/usr/local/lib/node_modules/n8n/node_modules/express/lib/router/index.js:275:10)
at /usr/local/lib/node_modules/n8n/node_modules/body-parser-xml/index.js:27:51
Hm, that is very strange. Because n8n is by default setup to allow up to 16MB and that can even be increased further by setting the environment variable N8N_PAYLOAD_SIZE_MAX to a larger value than 16.
So I understand you correctly that this even happens if you just start the n8n container locally and send data directly to it (so to port 5678)? Looking at the error message above does it seem to be the case.
I’m having a similar issue with Docker on Ubuntu using a S3 node. If I try to upload with a smaller file it works fine.
When I try with a file 13+ MB it crashes. It crashes memory too. I was using 1GB instance and upgraded to 2GB without success.
Thank you @MutedJam!
I had set N8N_PAYLOAD_SIZE_MAX but wasn’t aware about the N8N_DEFAULT_BINARY_DATA_MODE.
In the end I’ve built a workaround similar to what N8N_DEFAULT_BINARY_DATA_MODE does, but I think I’ve found a bug in a Edit Image node.
I’ll create another thread reporting it.
Hi @FIRE_TIKTOK, this depends a bit on how you run n8n (or other applications), not so much on how you have installed it.
Assuming you are using Linux (or MacOS, though I can’t test this myself), have installed n8n globally and run n8n manually, simply putting your environment variable before your n8n command would do the job. For example: