Error: status 413 Payload Too Large

Hi Everyone,
I’m working on a Rust canister which Stores a struct data, and provisions two different canisters using wasm. I have multiple functions to input and store struct data in parts, and have one function to provision both new canisters, but while deploying getting error " Error: status 413 Payload Too Large, content type “text/plain”,",

but after commenting the canister provisioning function, this was working fine, so I assume I’m getting error of high payload when putting both the functionalities in single canister due to size of wasm file.
I had tried ‘gzip’ on wasm after build and then deploying canister, and also tried with different versions of dfx, but didn’t work.
and getting

“reject message Chunked upload API is not yet implemented, error code Some(“IC0516”)”

for latest version,
please let me know how to work with this or if I’m missing anything.

Currently, WASMS on mainnet are restricted to 2MiB payload sizes. The larger wasms feature is very close to being enabled on mainnet.

1 Like