What happens when a canister hits freezing threshold I will not do anything for a long time?

What happens when a canister hits freezing threshold I will not do anything for a long time?

I mean will not do anything for long time - lets say a year.
Cycles will drop to zero, state (memory) will be lost and then…?

  1. Will the canister be removed entirely from IC?
  2. Will the controller of this canister be able to install the code and reuse the same canisterId?
  3. Or that canisterId will become available for all community (to create completely new canister)?

Could not find answers in docs.

References to documentation would be great if any…


It’s (2), see The Internet Computer Interface Specification | Internet Computer Home

The canister will get deallocated but the metadata (id, controllers) will be preserved for a minimum of 10 years, and I think currently there’s no code that really would delete it. This allows a controller to install a new canister even after the cycle balance hits zero.


Oh thanks for a quick response!

Sorry for necroposting but this helps keep information together in one place…

Is it possible to set the freeze threshold such that there are enough funds to preserve the data for a long time, e.g. 10 years? E.g. suppose that one has a canister that plays a video (just for the sake of argument). One might want to set it up so that as long as people top it up enough once every so often, the data is retained. If the video is watched frequently, to watch you just need to pay for cycles. If the video is watched only every couple of years, the cost per view also includes several gigabyte-years of storage. Having a configurable freezing threshold is just one possible approach and won’t be suitable for everything. But if I have precious files in a canister it would provide a guarantee that even if I do something stupid and run the cycles down, no usage can cause the time to deletion to fall below 10 years.

Another example: A document in https://notes.dstar.app Dstar is basically like google docs. I think it is fine if one comes to a document one hasn’t touched in years and be told: “Hey, you need to add cycles before you can read this” but it’s not OK for the document to disappear.

1 Like

Actually, this is already possible. I just couldn’t find it until I searched the source code.

dfx canister update-settings hello_backend --freezing-threshold 100000000000 --confirm-very-long-freezing-threshold

Note that the argument to the freezing threshold is given in seconds. This would be 3171 years. You’d probably lock up a lot of cycles in this canister :sweat_smile:

Everyone I’ve seen using this including me has tripped up with supplying the value as cycles. :sweat_smile:

Maybe it makes sense to change the value to accept cycles or rename the parameter to --freezing-threshold-in-seconds?

1 Like

I think that’s a good idea, and I think I talked to @Severin about it a long time ago :slight_smile: