Getting Error IC0504

The Replica returned an error: code 4, message: "IC0504: Canister 5fdjb-ryaaa-aaaaf-qabda-cai violated contract: RequestInPrep: current_size 5 exceeded the allowed limit intra-subnet 10485760 inter-subnet 2097152"

Not quite sure what this means. But, if I had to guess I’m abusing Motoko async…

    public func work() : async () {
        if (not isOn) return;

        var foo = [async ()];

        for (x in Iter.range(1, emit)) {
            foo := Array.append<async ()>(foo, [emitMessage()]);
            messagesSent := messagesSent + 1;
        };

        for (future in foo.vals()) {
            await future;
        };
    };

    private func emitMessage() : async () {
        try {
            await wbl.write({
                createdAt = Time.now();
                id = messagesSent;
                payload = Array.tabulate<Nat>(payloadSize, func(x : Nat) {x});
            });
        } catch (e : Error) {
            let msg = Error.message(e);
            ignore signals.write(msg);
        };
    };

Found this - Bug fix: normalize text rope prior to reject by crusso · Pull Request #1605 · dfinity/motoko · GitHub

Maybe something is wrong with the error text :eyes:

Edit 1: nope don’t think so.

Edit 2: I think this might have to do with me trying to send an 11MB payload. I was trying to force the call to fail so I could test my signals wbl worked.