moneroexamples / onion-monero-blockchain-explorer

Onion Monero Blockchain Explorer
https://xmrchain.net
BSD 3-Clause "New" or "Revised" License
361 stars 269 forks source link

[Discussion] docker compose: delay explore container #306

Closed DaWe35 closed 3 months ago

DaWe35 commented 6 months ago

Delaying the start of the explore container during the initial blockchain sync would be beneficial to

When starting both containers simultaneously, there is a race condition when the monerod container didn't create the lmbd folder yet, but the explore container tries to access it. It obviously exits with an error. (While I ran into this error, I didn't reproduced it yet).

While initial sync, the explore container uses a lot of CPU, leaving less resources to monerod. Because of that, I think it is a great idea to delay the start of explore and wait until sync finishes.

On the other hand, I had some issues on limited RAM servers when explore wasn't started first. Actually, even with the current compose setup, it hang up without any message, and when I restarted only explore container, it exited with code 137 (likely a RAM issue). Now if this is because of the initial sync, then there is another reason to delay the container, I'll test it again after sync finished.