# Failed to load resource: the server responded with a status of 413 (Payload Too Large)

**URL:** <https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166>\
**Category:** Help me!\
**Created:** [August 29, 2022, 6:52pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166 "2022-08-29T18:52:59Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [August 29, 2022, 6:52pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/1 "2022-08-29T18:52:59Z")

</div>

## Feature(s) impacted

Smart Action

## Observed behavior

We have a smart action to upload a document which is behind a request approval workflow when we go to trigger the action we get an error of “You don’t have the right to trigger this action anymore.” And if I check my console I’m getting an error of the Payload Too Large.

But when I remove it from the request approval workflow and make it so the smart action just triggers the request goes through, which makes me think it’s not related to the file size but some error on the request-approval side.

As on Forest Admin and on our server we have the file size limit to be 20mb and the file that we’re currently uploading is 4mb

## Expected behavior

For the smart action to execute successfully and go to the request approval workflow

## Failure Logs

 ![Screen Shot 2022-08-29 at 2.51.04 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/c/c74fe05b7ee66b177e2a4e211319edb13a1a806d.png)  
 ![Screen Shot 2022-08-29 at 2.51.19 PM](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/9/9f7acd8e7a32b1a82a19da38e819a7cbbf7461a3.png)

## Context

- Project name: Ourboro
- Team name: Customer Experience
- Environment name: Production or Development
- Agent type & version: …
- Recent changes made on your end if any: …

---

<div class="post-metadata">

**Author:** ![shohanr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/shohanr/32/4999_2.png) [@shohanr](https://community.forestadmin.com/u/shohanr)\
**Post date:** [August 30, 2022, 2:03pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/2 "2022-08-30T14:03:40Z")

</div>

Hi @Zero 👋

We are on the subject to tackle the issue.  
We will let you know when it will be released.

Best regards,

Shohan

---

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [August 30, 2022, 2:44pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/3 "2022-08-30T14:44:07Z")

</div>

Great thank you, do you think this will be for today? just need to plan with my team and do a work around if that’s not the case

---

<div class="post-metadata">

**Author:** ![anon39940173](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@anon39940173](https://community.forestadmin.com/u/anon39940173)\
**Post date:** [August 30, 2022, 3:40pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/4 "2022-08-30T15:40:37Z")

</div>

Hi @Zero

As we have no storage of our own on the agents side (and obviously can’t create tables on your database), approval workflow works the following way:

- When the approval request is submitted, the content of the smart action form is saved in our servers
- When an authorized user accepts the approval request, the frontend downloads the content of the form from our servers, and replays it to your agent (the approver is the one submitting the smart action).

The issue that you are having is that the initial form submission is larger than the max body size in our server.

I asked the performance team, and wrote a PR to increase that limit to 20mb on our side, but I’m still waiting for my coworkers to review and merge it.

It should be done tomorrow

---

<div class="post-metadata">

**Author:** ![anon39940173](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@anon39940173](https://community.forestadmin.com/u/anon39940173)\
**Post date:** [August 31, 2022, 8:58am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/5 "2022-08-31T08:58:27Z")

</div>

I just merged the PR.

It should be live in less than 10min

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [August 31, 2022, 9:31am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/6 "2022-08-31T09:31:01Z")

</div>

@Zero the fix is live now!  
Please let us know if everything is working as expected on your side.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [May 17, 2023, 3:42pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/7 "2023-05-17T15:42:33Z")

</div>

Hi,

I want to see if we can re-open this back up as the same issue is happening again for us we’re uploading a 6.8MB PDF and when we go to approve the action we’re getting the 413 payload too large error.

And if I do it without the approval workflow it goes through normally

---

<div class="post-metadata">

**Author:** ![arnaud](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud/32/32_2.png) [@arnaud](https://community.forestadmin.com/u/arnaud)\
**Post date:** [May 18, 2023, 8:49am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/8 "2023-05-18T08:49:27Z")

</div>

Hi @Zero,

Very sorry to hear that.  
Did you recently upgraded your agent version? If so, could you try to revert to your previous version?

In the meantime, we will dig into the latest changes made on the platform.  
Do you have an idea of the moment when it started to break yesterday?

Thanks a lot for your help.

---

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [May 18, 2023, 11:21am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/9 "2023-05-18T11:21:58Z")

</div>

We’re on sequelize 8.5.14 and it’s been working ok in the past it’s happened before but your team mentioned it was a bug and fixed it. So not sure if it’s come back again

---

<div class="post-metadata">

**Author:** ![shohanr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/shohanr/32/4999_2.png) [@shohanr](https://community.forestadmin.com/u/shohanr)\
**Post date:** [May 23, 2023, 8:47am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/10 "2023-05-23T08:47:04Z")

</div>

Hi @Zero ,

Are you using hooks for this smart action ?

---

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [May 23, 2023, 3:01pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/11 "2023-05-23T15:01:35Z")

</div>

Yes I am, the hooks hit an external API to fetch a document URL

---

<div class="post-metadata">

**Author:** ![shohanr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/shohanr/32/4999_2.png) [@shohanr](https://community.forestadmin.com/u/shohanr)\
**Post date:** [June 8, 2023, 7:17am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/12 "2023-06-08T07:17:58Z")

</div>

Hi @Zero ,

I am sorry for the late answer.  
The explanation for your 413 is probably normal because of the following processes:

- When using a form with hooks, all fields are sent x2 times to have the precedent values and the new ones.
- When using a file, it is sent in format base64, so the size of the image in the payload will be x (4/3).
- And obviously, the payload will take into account all the fields from the form.

With these, I think that with a 6.8Mb image X (4/3) X 2 + other fields x 2, it could reach a payload of 20Mb and sending you a 413 payload too large.  
Unfortunately, we will not increase this size limit.

Once again, our apologies for the late answer.

Best regards,

Shohan

---

<div class="post-metadata">

**Author:** ![Zero](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/zero/32/479_2.png) [@Zero](https://community.forestadmin.com/u/Zero)\
**Post date:** [June 8, 2023, 10:36am UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/13 "2023-06-08T10:36:02Z")

</div>

Hi,

So what can I do in this case? If you’re not increasing the payload size

---

<div class="post-metadata">

**Author:** ![shohanr](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/shohanr/32/4999_2.png) [@shohanr](https://community.forestadmin.com/u/shohanr)\
**Post date:** [June 19, 2023, 3:44pm UTC](https://community.forestadmin.com/t/failed-to-load-resource-the-server-responded-with-a-status-of-413-payload-too-large/5166/15 "2023-06-19T15:44:29Z")

</div>

Hi @Zero ,

My apologies for the late answer.

Unfortunately, the approval system with upload of files is not well supported. If you need this size of file, you will have to deactivate the approval system.

Best regards,

Shohan
