Canister violated contract: Payload Size

The error message complains about too large message payload. Its payload exceeded the 2MB (not 2GB) limit. Looks like the canister tries to return ~4.5MB in that call (since the error is in msg_reply_data_append).

Can you think of cases when the canister can return large responses?

Regarding, the Wasm memory limit. I don’t see the connection. Was the Wasm memory limit proposal recently executed for that canister? If it hits the limit, the error message would be different. If you share the source code, I can take a look to see if there is any connection there.