I’m running libbitcoin’s bitcoin-server on a VPS with 1 GB of RAM and 512 MB of swap, which is clearly not enough. The server starts getting killed for reaching an out-of-memory condition every minute or so after block #200000, even on Testnet.

It’s dirty and it clogs up fast, but it works.

Every OOM kill adds to the possibility of database corruption. So I sometimes back it up, too.


# bitcoin-server launch wrapper
# restarts the server if it gets OOM-killed

while true; do
    if [ "x`pidof bs`" = "x" ]; then
        cd /home/veox/testnet
        /usr/sbin/logrotate -s ./bs.logrotate.status ./bs.logrotate
        /home/veox/usr/bin/bs /home/veox/usr/etc/libbitcoin/bs.cfg
    sleep 10


/home/veox/testnet/error.log /home/veox/testnet/debug.log {
    size 1M
    rotate 21


"/home/veox/testnet/error.log" 2015-5-24-21:22:55
"/home/veox/testnet/debug.log" 2015-5-24-21:22:55