Status 413 Payload Too Large

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.

Any help appreciated.

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

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

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.

2 Likes

Exactly what I was looking for, thanks.

1 Like