//error
The Replica returned an error: code 5, message: "Canister moi4t-aqaaa-aaaaa-qbbra-cai trapped explicitly: An error happened during the call: 5: Canister mjj2h-niaaa-aaaaa-qbbrq-cai cannot be installed because the canister is not empty. Try installing with mode='reinstall' instead.
The data in this container is needed and cannot be cleared, so you cannot use reinstall to re-overwrite the installation, but I guarantee that the owner is correct,
The Replica returned an error: code 5, message: "Canister moi4t-aqaaa-aaaaa-qbbra-cai trapped explicitly: An error happened during the call: 5: Canister mjj2h-niaaa-aaaaa-qbbrq-cai exceeded its allowed memory allocation"
What should I do? There are too many users of this project at present, and reinstall cannot be used.
The Replica returned an error: code 5, message: "Canister moi4t-aqaaa-aaaaa-qbbra-cai trapped explicitly: An error happened during the call: 5: MemoryAllocation expected to be in the range [0..8589934592], got 16000000000"
To be fair, network=ic points to the sodium alpha network, and won’t be pointed to mercury until Genesis. Can’t say I’ve personally tried allocating a terabyte of space on mercury yet though
The Replica returned an error: code 1, message: “Canister zsrsb-paaaa-aaaab-abbva-cai with memory allocation 10MiB cannot be installed because the Subnet’s remaining memory capacity is 0MiB”
I opened a bug report here. The upper limit certainly isn’t 256TB for Sodium or Mercury. We’ll find the actual limit and update the documentation. Thanks for pointing this out.
Can I have any other suggestions? Currently I need to push the code into the container, but the cli always prompts smart reinstall. I still need the container content data, so I can’t use reinstall.
Hello
Is there any other way to upgrade the container jar? At present, I need to try to upgrade the container to try to deploy the code. Debug my problem
I’m pretty sure mode=reinstall won’t wipe your state, but I also don’t want to recommend something that would hurt your app.
In your shoes, I’d try testing an upgrade on your local network.
Long-term I think there’s an some strategic way you could provision a new canister and migrate the data, but that’s really far outside my wheelhouse
When I use reinstall in the local network, the data in the container is lost, so I can’t use reinstall, and the function of reinstall is still the same as stated in the official document Are consistent, the container will be reinitialized
I am almost certain that, contrary to what you were told above, --mode=reinstall does wipe the state - it essentially recycles the old canister id for new code, starting from clean state.
--mode=upgrade is probably what you want, provided your code is written to make use of stable storage.
I’m not sure how to help you with the allocation question, unfortunately, but perhaps some other engineer can help. Is it possible that your upgrade code is allocating too many resources and another version could be written to avoid that? I can’t even tell if this is Motoko or Rust code.
You can also selectively upgrade single canisters (perhaps only the code and interface of one has evolved) not just all of them, if that helps avoid the resource exhaustion.
The Replica returned an error: code 5, message: "Canister moi4t-aqaaa-aaaaa-qbbra-cai trapped explicitly: An error happened during the call: 5: Canister mjj2h-niaaa-aaaaa-qbbrq-cai exceeded its allowed memory allocation"
I am thinking, is it caused by too much data in my interface container?
Installing code for canister www, with canister_id m4olk-maaaa-aaaaa-qbbsa-cai
Authorizing our identity (icpFarms) to the asset canister...
Uploading assets to asset canister...
At present, I see the error of --mode=upgrade, test whether the container on the Internet is hard-coded and only allows a fixed space to be allocated. If the application mechanism is allowed to expand the container according to the document, perhaps this problem of mine can be solved