Kill ckpool on bitcoind failure so miners can failover
When bitcoind is unreachable for 3+ consecutive polls and no block submission is pending, SIGTERM the ckpool process so miners disconnect and failover to backup pools. Adds a red dashboard banner when Bitcoin Core is down.
This commit is contained in:
@@ -25,10 +25,22 @@
|
||||
// Alarm when ZMQ is 3+ min older than the last tip change.
|
||||
return zmqAge > tipAge + 180;
|
||||
});
|
||||
|
||||
const bitcoindDown = $derived(snap.data != null && !snap.data.bitcoin_ok);
|
||||
</script>
|
||||
|
||||
{#if submitGap > 0 || zmqStale}
|
||||
{#if bitcoindDown || submitGap > 0 || zmqStale}
|
||||
<div class="banners">
|
||||
{#if bitcoindDown}
|
||||
<div class="banner error">
|
||||
<span class="icon">!</span>
|
||||
<div class="text">
|
||||
<strong>Bitcoin Core is unreachable.</strong>
|
||||
Stratum server has been stopped — miners will failover to backup pools.
|
||||
Service will resume automatically when Bitcoin Core recovers.
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if submitGap > 0}
|
||||
<div class="banner warn">
|
||||
<span class="icon">!</span>
|
||||
@@ -75,6 +87,11 @@
|
||||
border-color: rgb(220, 170, 60);
|
||||
color: rgb(220, 180, 100);
|
||||
}
|
||||
.banner.error {
|
||||
background: rgb(50, 20, 20);
|
||||
border-color: rgb(220, 60, 60);
|
||||
color: rgb(230, 120, 120);
|
||||
}
|
||||
.icon {
|
||||
flex: 0 0 auto;
|
||||
width: 1.5em;
|
||||
|
||||
Reference in New Issue
Block a user