cculianu / Fulcrum

A fast & nimble SPV Server for BCH, BTC, and LTC
Other
331 stars 76 forks source link

Dies syncing with FATAL: std::bad_alloc #193

Open joltcan opened 1 year ago

joltcan commented 1 year ago

Running Fulcrum in a VM (esx 6.7) with 32 GB RAM and 8 cores (also has bitcoind running). The other day Fulcrum stopped with the infamous

<Controller> FATAL: std::bad_alloc
The database is now likely in an inconsistent state. To recover, you will need to delete the datadir and do a full resynch. Sorry!

The following settings are non-standard, based on various googling to see if we can get it to do the initial sync faster:

db_max_open_files = 200000
db_mem = 2048.0
fast-sync = 3000
max_batch = 10000
announce = false
peering = false

Any guesses or anything we can do. It was running for a few months without any hickups.

MarkyMark0100 commented 1 year ago

Running Fulcrum also in a VM (ESXi 7.01) 6vCPU 16GB RAM. BitcoinCore is running too. I installed Fulcrum 1.9.1, and after 5 days syncing (99%) I got the massage that the database has been corrupted. After deleting the fulcrum_db I started again. After another day (66%) I got the same message.

Screenshot from 2023-08-16 19-57-19 LOG.txt LOG_old_1692207067861514.txt

Any idea what I can do?

cculianu commented 1 year ago

Don't use fast-sync. it is experimental and doesn't always work ok and may eat memory. Also max open files .. just leave it at default.

cculianu commented 1 year ago

If worried maybe enabling swap would help avoid OOMs..

MarkyMark0100 commented 1 year ago

Thank you for your quick response. I try it with disabled fast-sync again.

MarkyMark0100 commented 1 year ago

Hello cculianu, syncing just finished. Without fast-sync. Thanks

cculianu commented 1 year ago

Yay!