Quick start: Info on stopping deployed canister is missing

Hi, I am just getting started with understanding to use the internet computer. My background isn’t computer science. Hence, my question may have a simple answer that I overlooked.

I was able to successfully follow and implement on my end all the instructions to host a static website - Hosting a Static Website on the Internet Computer :: Internet Computer. Towards the end of the quick-start guide, it says that we deploy our website using

dfx deploy --network ic

However, it does not say how to stop this deployed canister? My deployed canister seems to be continuously using up the cycles in my default cycle wallet for a week now. I can see the cycle count reducing in my default cycle wallet. I tried running the following to stop the canister,

dfx canister stop --all

But, it gives the following error,

An error happened during communication with the replica: error sending request for url ( error trying to connect: tcp connect error: Connection refused (os error 61)

Can you please help me understand and possibly help me stop the canister?

Thanks a lot for your help.
I am excited to learn more and develop on the IC.


1 Like

I think I partially figured out the solution.
When I executed the following command, I think it stopped the canister on IC and withdrew some cycles.

dfx canister --network ic delete --all

Clearly, it increased my cycles balance as observed when I run,

dfx wallet --network ic balance

But, the cycles balance still seems to be slowly decreasing day by day.
Can anyone explain what is happening with the cycles?
It will be beneficial to anyone starting on IC to also understand the implications to cycles when running this quick start tutorial - Hosting a Static Website on the Internet Computer :: Internet Computer.

Thank you.

Thanks for taking the time to post. I will ping team to see if anybody can take a look.

Hi @adityamnk, I am facing the same kind of issues and in an identical context. I have followed the same tutorial as you did and successfully deployed my canister.

However, after running the dfx canister --network ic stop website and the dfx canister --network ic delete website, I noticed that my cycles balance kept decreasing, when running dfx wallet --network ic balance.

I don’t get why it keeps decreasing since my only canister is offline & deleted. Some precisions would be appreciated, thanks !

Hey there. It seems like you have a cycles wallet. Since that is in itself a smart contract - or a canister - it will “consume” some cycles. While you will see a difference between two calls of “dfx wallet --network ic balance”, the cost is negligible if you don’t have real canisters deployed doing real computations. The cost that you incur on a cycles canister is minimal in terms of storage, and you’re likely seeing the cost of actually calling the canister each time :slight_smile:

You can find a more detailed list of cycles associated costs here: Computation and Storage Costs :: Internet Computer

In other words, you shouldn’t worry about it too much. You won’t run out of cycles with just a wallet deployed.


What was needed was to specify the network:
dfx canister --network ic stop --all

1 Like

This makes sense. Thanks for the clarification. I didn’t realize that the default cycles wallet was also a canister.