NebulousLabs / Sia-UI

A Graphical Frontend for Sia - https://sia.tech
MIT License
389 stars 109 forks source link

siad crashes whenever trying to unlock wallet #356

Closed bitcoincoltd closed 8 years ago

bitcoincoltd commented 8 years ago

I'm running siad headless on a Digitalocean 512MB RAM node and every time I try to unlock the wallet it crashes siad.

curl -A "Sia-Agent" "localhost:9980/wallet/unlock" --data "encryptionpassword=mypassword"

The message siad gives before exiting:

Rescanning consensus set...
Scanned to height 46039...Killed
pmknutsen commented 8 years ago

Increase ram or swap

  1. jul. 2016 3:42 p.m. skrev "Bitcoin Co. Ltd." notifications@github.com:

I'm running siad headless on a Digitalocean 512MB RAM node and every time I try to unlock the wallet it crashes siad.

curl -A "Sia-Agent" "localhost:9980/wallet/unlock" --data "encryptionpassword=mypassword"

The message siad gives before exiting:

Rescanning consensus set... Scanned to height 46039...Killed

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NebulousLabs/Sia-UI/issues/356, or mute the thread https://github.com/notifications/unsubscribe/ABfjO9FutyHD9Ay2UraznuFa6dYd6wBCks5qS7DbgaJpZM4JGF1O .

Fornax96 commented 8 years ago

Killed means that the kernel killed the process for using too much memory.

Sia needs a machine with at least 4 GB of RAM and 4 GB of swap.

bitcoincoltd commented 8 years ago

4GB of RAM and 4GB of swap is insanely high for a headless daemon...

Fornax96 commented 8 years ago

bitcoind uses more iirc

lukechampine commented 8 years ago

This will likely be addressed when we make improvements to the wallet. Still, 512MB of RAM may cause issues since we use multiple mmap'd Bolt databases.

pmknutsen commented 8 years ago

I would say 2 & 2 is plenty, even when running the explorer. Which reminds me: Check the -M switch for siad and disable modules you dont need.

  1. jul. 2016 3:49 p.m. skrev "Bitcoin Co. Ltd." notifications@github.com:

4GB of RAM and 4GB of swap is insanely high for a headless daemon...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NebulousLabs/Sia-UI/issues/356#issuecomment-230776858, or mute the thread https://github.com/notifications/unsubscribe/ABfjO1DOijTW85qqoJGuyOw6VsqG9eOVks5qS7KHgaJpZM4JGF1O .

Fornax96 commented 8 years ago

If you really want to run it on a digitalocean droplet you may get away with just setting up 4 GB of swap. But remember that that will make Sia very slow. Luckily DO is SSD based so it will still be usable.

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

bitcoincoltd commented 8 years ago

Added a 6GB swap and that works to unlock the wallet (looking at the memory usage 1GB of swap would probably have been enough)

Fornax96 commented 8 years ago

When you start uploading files it will start using more.

Back with version 0.5 I added 6 GB of swap too and it still ran out of memory, but that may have improved since then. I have not personally tried to run 1.0 on digitalocean yet

EDIT: Looking at my own siad instance it's using about 2.5 GB, and that is while it's uploading and hosting, so it's definitely better. Adding 3 GB swap would probably have been enough

droghio commented 8 years ago

Closing since the issue doesn't really concern the Sia-UI and appears to have a work around.