# Status 413 Payload Too Large

**URL:** <https://forum.dfinity.org/t/status-413-payload-too-large/26670>\
**Category:** Developers\
**Created:** [January 14, 2024, 11:30pm UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670 "2024-01-14T23:30:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [January 14, 2024, 11:30pm UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/1 "2024-01-14T23:30:17Z")

</div>

Hi,

I get the error " Failed during wasm installation call: The replica returned an HTTP Error: Http Error: status 413 Payload Too Large" when deploying locally.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/0/099955043065c398f6f69b513c51f9f1df1e1d4c.png)

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [January 15, 2024, 1:05am UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/2 "2024-01-15T01:05:56Z")

</div>

Looks like the canister WASM is too large. You can make it smaller if you have use optimizers for compiling, but only so much.  
I ran into this because i had a few actor class references, which bloats the canister WASM

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [January 15, 2024, 1:06am UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/3 "2024-01-15T01:06:18Z")

</div>

I also heard you can zip it, but i haven’t done that

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [January 15, 2024, 2:05am UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/4 "2024-01-15T02:05:17Z")

</div>

Yeah the problem has occurred ever since adding actor class references that are used in the multi-canister architecture.

Are there any docs on using optimisers? I’m close to the limit and shouldn’t need any more actor classes just yet…

I’ve also seen some stuff on using gzip but again just looking for a pointer in the right direction on how to do it.

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [January 15, 2024, 2:14am UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/5 "2024-01-15T02:14:32Z")

</div>

> **[8: Optimizing canisters | Internet Computer](https://internetcomputer.org/docs/current/developer-docs/backend/motoko/optimizing#using-wasm-opt)**
>
> Overview

> **[Large web assembly modules | Internet Computer](https://internetcomputer.org/docs/current/developer-docs/production/larger-wasm#installing-a-gzip-compressed-webassembly-module)**
>
> Overview

> [@Motoko actor class deployment options](https://forum.dfinity.org/t/motoko-actor-class-deployment-options/25271):
>
> I have an issue where I have a few actor classes that I want to deploy from my main canister but I am running into an issue where each actor class takes about ~500KB of WASM space, so im looking into alternative options. Here is what I see as options Spread out the actor classes to other canister(s) Deploy actor classes from dfx (This might have an issue of not being deployable via a DAO) ? Any help or suggestions would be appreciated

---

<div class="post-metadata">

**Author:** ![jamesbeadle](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jamesbeadle/32/10110_2.png) [@jamesbeadle](https://forum.dfinity.org/u/jamesbeadle)\
**Post date:** [January 15, 2024, 2:27am UTC](https://forum.dfinity.org/t/status-413-payload-too-large/26670/6 "2024-01-15T02:27:40Z")

</div>

Exactly what I was looking for, thanks.
