running bitcoind in docker returns out of disk space error

0

I'm attempting to run a bitcoind container in testnet mode. I've set the prune value to 550mb in the environment variable flag (I've also tried writing it in the bitcoin.conf file) The reason for doing this is I would like to run unit tests on a service I've written that uses RPC to communicate and send commands to a bitcoin livenet node I have in my production environment. I don't want to download the entire blockchain and so I've tried to prune.

On booting the container, it begins to sync, however after 20-30 minutes, the bitcoin daemon tells me I've run out of disk space and the container terminates itself.

I have tried pruning docker for any unused containers and volumes. Error persists.

Error:

Error: Error: Disk space is low!
2020-07-14T13:09:52Z ERROR: ConnectBlock(): FindUndoPos failed
2020-07-14T13:09:52Z ERROR: ConnectTip: ConnectBlock 000000000022d82cb477d35be707bb013defe24ae82998bb88ad3a4884759758 failed, out of disk space (code 0)      
2020-07-14T13:09:52Z ERROR: ProcessNewBlock: ActivateBestChain failed (out of disk space (code 0))
2020-07-14T13:09:52Z UpdateTip: new best=000000000022d82cb477d35be707bb013defe24ae82998bb88ad3a4884759758 height=75849 version=0x00000001 log2_work=53.328994 
tx=106882 date='2010-08-23T10:34:06Z' progress=0.000195 cache=16.0MiB(85770txo)
2020-07-14T13:09:52Z UpdateTip: new best=00000000001a981f431784fd2f1b6f8b381a214c46c6fdc03c84a021f9382e08 height=75850 version=0x00000001 log2_work=53.329274 
tx=106883 date='2010-08-23T10:35:34Z' progress=0.000195 cache=16.0MiB(85771txo)
2020-07-14T13:09:52Z tor: Thread interrupt
2020-07-14T13:09:52Z Shutdown: In progress...
2020-07-14T13:09:52Z torcontrol thread exit
2020-07-14T13:09:52Z addcon thread exit
2020-07-14T13:09:52Z opencon thread exit
2020-07-14T13:09:52Z msghand thread exit
2020-07-14T13:09:52Z net thread exit
2020-07-14T13:09:52Z scheduler thread interrupt
2020-07-14T13:09:52Z Dumped mempool: 6e-06s to copy, 0.052894s to dump
2020-07-14T13:09:52Z *** Disk space is low!
2020-07-14T13:09:52Z Error: Error: Disk space is low!
Error: Error: Disk space is low!
2020-07-14T13:09:52Z FlushStateToDisk: failed to flush state (out of disk space (code 0))
2020-07-14T13:09:52Z *** Disk space is low!
2020-07-14T13:09:52Z Error: Error: Disk space is low!
Error: Error: Disk space is low!
2020-07-14T13:09:52Z FlushStateToDisk: failed to flush state (out of disk space (code 0))
2020-07-14T13:09:52Z [default wallet] Releasing wallet
2020-07-14T13:09:52Z Shutdown: done

Video Explanation https://www.loom.com/share/c71dcd805f7c4761a62eeebec1d1a406

docker
bitcoind
asked on Stack Overflow Jul 14, 2020 by Lorza • edited Jul 14, 2020 by Lorza

1 Answer

0

You have two options here

  1. Mounting a local volume in the path that you are writing the data

  2. Increasing the docker disk image size

Docker has a default value of 10G for each container and you can increase it using this command dockerd --storage-opt dm.basesize=100G

It is not a best practice, but it will help you for now

answered on Stack Overflow Jul 14, 2020 by Sergio Tanaka

User contributions licensed under CC BY-SA 3.0