From 191ad53a46c53333d3518e5c0a8fd98921aa9649 Mon Sep 17 00:00:00 2001 From: Urvi Date: Fri, 10 Nov 2023 15:14:00 -0800 Subject: [PATCH] Suppress stellar-core unreachable when horizon is building state. --- services/horizon/internal/app.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/horizon/internal/app.go b/services/horizon/internal/app.go index 635b0b9359..cbcb4a4a83 100644 --- a/services/horizon/internal/app.go +++ b/services/horizon/internal/app.go @@ -400,6 +400,14 @@ func (a *App) UpdateStellarCoreInfo(ctx context.Context) error { return nil } + // #4446 If the ingestion state machine is in the build state, the query can time out + // because the captive-core buffer may be full. In this case, skip the check. + if a.config.CaptiveCoreToml != nil && + isLocalAddress(a.config.StellarCoreURL, a.config.CaptiveCoreToml.HTTPPort) && + a.ingester != nil && a.ingester.GetCurrentState() == ingest.Build { + return nil + } + core := &stellarcore.Client{ URL: a.config.StellarCoreURL, }