# PayloadTooLargeError: request entity too large for 100kb request

**URL:** <https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775>\
**Category:** Questions\
**Tags:** deployment\
**Created:** [September 10, 2021, 4:25am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775 "2021-09-10T04:25:18Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![KM19](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@KM19](https://community.n8n.io/u/KM19)\
**Post date:** [September 10, 2021, 4:25am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/1 "2021-09-10T04:25:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [September 10, 2021, 5:13am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/2 "2021-09-10T05:13:39Z")

</div>

Hi @KM19,

How do you have n8n setup?

I had something similar although it was 1mb when I first set up n8n behind an nginx proxy I had to set the client\_max\_body\_size option.

---

<div class="post-metadata">

**Author:** ![KM19](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@KM19](https://community.n8n.io/u/KM19)\
**Post date:** [September 10, 2021, 5:48am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/3 "2021-09-10T05:48:48Z")

</div>

I install it using docker, following steps from below url

> **[Docker | n8n Docs](https://docs.n8n.io/hosting/installation/docker/)**
>
> Documentation for n8n, a workflow automation platform.

---

<div class="post-metadata">

**Author:** ![KM19](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@KM19](https://community.n8n.io/u/KM19)\
**Post date:** [September 10, 2021, 6:39am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/4 "2021-09-10T06:39:23Z")

</div>

also tried to run it locally using docker as well. Cant post something \>= 100kb to webhook endpoint

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 10, 2021, 7:07am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/5 "2021-09-10T07:07:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![KM19](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@KM19](https://community.n8n.io/u/KM19)\
**Post date:** [September 10, 2021, 7:28am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/6 "2021-09-10T07:28:37Z")

</div>

yes I am aware about N8N\_PAYLOAD\_SIZE\_MAX as I did some research, tried to enter a larger number but still cant solve the problem

I tried 2 ways

1. deploy the docker in AWS ec2, with domain mapped, and encounter the error when I post a request \>100kb to webhook endpoint using postman
2. run the docker in my macbook locally with port 5678, still have the same error

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 10, 2021, 9:35am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/7 "2021-09-10T09:35:03Z")

</div>

Thanks for confirming. We will have a deeper look.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 10, 2021, 10:10am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/8 "2021-09-10T10:10:52Z")

</div>

Thanks for making us aware of this issue. We could now reproduce it and fix. It will be released with the next version in the next days.

We will build a new nightly version very soon which will include that fix. Will then update here.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 10, 2021, 12:08pm UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/9 "2021-09-10T12:08:58Z")

</div>

You should now be able to use the nightly docker build `n8nio/n8n:nightly` which includes the fix.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [September 15, 2021, 10:04am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/10 "2021-09-15T10:04:28Z")

</div>

Got released with n8n@0.138.0

---

<div class="post-metadata">

**Author:** ![lero](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@lero](https://community.n8n.io/u/lero)\
**Post date:** [April 21, 2022, 1:53am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/11 "2022-04-21T01:53:53Z")

</div>

Hello,

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.

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/0/00a01b55ef25e55d1c349ce3f0f8b2f5c6e16417.png)

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [April 21, 2022, 10:17am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/12 "2022-04-21T10:17:39Z")

</div>

Hey @lero, I am sorry to hear you’re having trouble. Have you seen this post?

> [@Working with larger files (2MB - 20MB+)](http://community.n8n.io/t/working-with-larger-files-2mb-20mb/11073/4):
>
> Hi @messi198310, as mentioned in the past (e.g. [Upload all files from FTP to Nextcloud - #16 by MutedJam](http://community.n8n.io/t/upload-all-files-from-ftp-to-nextcloud/10302/16)) I suggest using a more specialized tool when working with larger binary files such as rclone (which can still be controlled through n8n). That said, if you want to do this with n8n the below might help: Address the 413 issue by setting the N8N\_PAYLOAD\_SIZE\_MAX [variable](https://docs.n8n.io/reference/environment-variables.html#endpoints) to a higher value (you can find more background information on this [here](https://github.com/n8n-io/n8n/issues/1447)). When using a reverse proxy you might also need…

It contains some general pointers for dealing with larger files in n8n.

If these don’t help it might be worth opening a new topic with the exact steps required to reproduce your problem.

---

<div class="post-metadata">

**Author:** ![lero](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@lero](https://community.n8n.io/u/lero)\
**Post date:** [May 9, 2022, 9:09pm UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/13 "2022-05-09T21:09:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FIRE\_TIKTOK](https://avatars.discourse-cdn.com/v4/letter/f/858c86/32.png) [@FIRE\_TIKTOK](https://community.n8n.io/u/FIRE_TIKTOK)\
**Post date:** [July 15, 2022, 8:47pm UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/14 "2022-07-15T20:47:44Z")

</div>

hello everyone same problem But how to set “N8N\_PAYLOAD\_SIZE\_MAX” if n8n is installed via npm?

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [July 18, 2022, 7:41am UTC](https://community.n8n.io/t/payloadtoolargeerror-request-entity-too-large-for-100kb-request/7775/15 "2022-07-18T07:41:25Z")

</div>

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:

```auto
N8N_PAYLOAD_SIZE_MAX=1024 n8n

```

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/c/c40bfe8840b90cf08b8c5ccaf206e0e89a4d002f.jpeg)

Hope this helps!
