I am playing around with canister_on_low_wasm_memory
and I’m trying to set the wasm memory threshold with dfx canister create as per dfx canister | Internet Computer but I get the following error
$ dfx canister create myCanister --no-wallet --wasm-memory-limit 840210069 --wasm-memory-threshold 663765954
error: unexpected argument '--wasm-memory-threshold' found
tip: a similar argument exists: '--wasm-memory-limit'
Usage: dfx canister create --no-wallet <CANISTER_NAME>
For more information, try '--help'.
$ dfx --version
dfx 0.24.3
Setting the threshold in the dfx.json
seems to work in so far as it will create the canister, but I don’t see any any verification of the threshold being set in dfx canister status
.
$ dfx canister status canister
Canister status call result for canister.
Status: Running
Memory allocation: 0
Compute allocation: 0
Freezing threshold: 2_592_000
Idle cycles burned per day: 966_906_148
Memory Size: Nat(1230014074)
Balance: 99_995_539_183_442 Cycles
Reserved: 0 Cycles
Reserved cycles limit: 5_000_000_000_000 Cycles
Wasm memory limit: 840_210_069 Bytes
Module hash: 0x572464958e291223aec48094922296ed846b506dc9329f174d073bfd0249ffb9
Number of queries: 0
Instructions spent in queries: 0
Total query request payload size (bytes): 0
Total query response payload size (bytes): 0
Log visibility: controllers
And canister_on_low_wasm_memory
seems to be called as the memory crosses the wasm_memory_limit
and not in the window created by the threshold and the limit as it seems to be described.
Am I misunderstanding how wasm_memory_threshold
is supposed to work, or is this a limitation of dfx
? Any insights would be appreciated!