**Motivations:** - Prevent bitcoind crashes caused by heavy RPC calls without timeout - Document bitcoind crash and wallet loading stuck issues - Clean up obsolete files (configure-nginx-proxy.sh, userwallet components, website-skeleton, old fixKnowledge docs) **Root causes:** - RPC calls without timeout causing bitcoind crashes - No pre-check of bitcoind health before heavy operations - Large wallet (315MB) causing long loading times and potential hangs - Missing retry mechanism for transient errors **Correctifs:** - Add timeouts on RPC calls (5 minutes for listunspent, 10 seconds for healthcheck) - Add bitcoind health check before synchronization - Implement retry with exponential backoff - Reduce maximumCount limit from 9999999 to 500000 UTXOs - Improve cron script with pre-checks and better error handling - Add container status verification before script execution **Evolutions:** - New check-services-status.sh script for service diagnostics - Documentation of crash issues in fixKnowledge - Improved logging with timestamps - Better error messages and handling **Pages affectées:** - data/sync-utxos-spent-status.mjs - data/sync-utxos-cron.sh - data/restart-services-cron.sh - data/check-services-status.sh (new) - fixKnowledge/sync-utxos-rpc-optimization.md (new) - fixKnowledge/signet-bitcoind-crash-mining-stopped.md (new) - fixKnowledge/signet-bitcoind-crash-wallet-loading-stuck.md (new) - Removed obsolete files: configure-nginx-proxy.sh, userwallet components, website-skeleton files, old fixKnowledge docs Co-authored-by: Cursor <cursoragent@cursor.com>
56 lines
1.8 KiB
Markdown
56 lines
1.8 KiB
Markdown
# Signet: bitcoind crash, mining stopped
|
||
|
||
**Date:** 2026-02-05
|
||
**Auteur:** Équipe 4NK
|
||
|
||
## Problème
|
||
|
||
La chaîne signet ne mine plus. Les logs du miner affichent en boucle :
|
||
`error: timeout on transient error: Could not connect to the server 127.0.0.1:38332`.
|
||
|
||
## Cause
|
||
|
||
Le processus **bitcoind** a cessé de tourner à l’intérieur du conteneur `bitcoin-signet-instance`. Le conteneur reste « Up », mais seul le script `run.sh` et `mine.sh` sont actifs ; bitcoind n’apparaît plus dans `ps aux`. Le RPC bitcoind (port 38332) ne répond donc pas.
|
||
|
||
Dans `signet/debug.log`, la dernière ligne utile est un `CreateNewBlock()` ou `UpdateTip` ; aucune ligne d’erreur ou de shutdown explicite (crash ou kill possible, ex. OOM).
|
||
|
||
## Diagnostic
|
||
|
||
1. Lancer le script d’état :
|
||
```bash
|
||
./data/check-services-status.sh
|
||
```
|
||
2. Si « RPC: HORS SERVICE » pour bitcoind alors que le conteneur est Up : confirmer avec
|
||
```bash
|
||
docker exec bitcoin-signet-instance ps aux
|
||
```
|
||
(absence du processus `bitcoind`).
|
||
3. Dernières lignes du log bitcoind :
|
||
```bash
|
||
docker exec bitcoin-signet-instance tail -20 /root/.bitcoin/signet/debug.log
|
||
```
|
||
|
||
## Correction
|
||
|
||
Redémarrer le conteneur pour relancer bitcoind (et donc le minage) :
|
||
|
||
```bash
|
||
docker restart bitcoin-signet-instance
|
||
```
|
||
|
||
Attendre ~30–60 s que bitcoind et le wallet soient prêts, puis vérifier :
|
||
|
||
```bash
|
||
docker exec bitcoin-signet-instance bitcoin-cli -datadir=/root/.bitcoin getblockchaininfo
|
||
```
|
||
|
||
## Prévention / suivi
|
||
|
||
- Utiliser `./data/check-services-status.sh` régulièrement (ou via cron) pour détecter RPC hors service.
|
||
- En cas de répétition des crashes, investiguer (RAM, disque, `dmesg` OOM, logs bitcoind complets).
|
||
|
||
## Pages affectées
|
||
|
||
- `data/check-services-status.sh` (script de vérification)
|
||
- `fixKnowledge/signet-bitcoind-crash-mining-stopped.md` (ce document)
|