Occasional replica unhealthy response when deploying?

I’ve been getting following error and I’m not sure if i’m doing something wrong.

Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'token'.
      Failed to install wasm in canister 'lfqyb-'.
        Failed to install wasm.
          The replica returned an HTTP Error: Http Error: status 503 Service Unavailable, content type "application/cbor", content: Replica is unhealthy: CertifiedStateBehind. Check the /api/v2/status for more information.

Then when I try again i get this error

Error: Failed while trying to deploy canisters.
Caused by: Failed while trying to deploy canisters.
  Failed while trying to install all canisters.
    Failed to install wasm module to canister 'token'.
      Failed to install wasm in canister 'lfqyb-i'.
        Failed to install wasm.
          The Replica returned an error: code 2, message: "Canister lfqyb- is rate limited because it executed too many instructions in the previous install_code messages. Please retry installation after several minutes."

This should be handled by the agent. I filed a ticket for that (note to self: ticket)

This sounds like a DDoS protection measure. I assume you have expensive functions that you call on canister deployments. How much did you try to deploy? I’m asking to figure out whether the limit is low, or you simply hit the very long tail of use cases

I think it’s caused by a combination of my pre upgrade that was super busy I optimized it and something going on with the subnet. I redeployed in a different subnet and we chillen now.

1 Like