diff --git a/client/interceptors/uci_retry.go b/client/interceptors/uci_retry.go index ace9747..ceefa9e 100644 --- a/client/interceptors/uci_retry.go +++ b/client/interceptors/uci_retry.go @@ -53,6 +53,12 @@ func RetryUnaryClientInterceptor( return true } + // Retry when the connection drops (e.g. "connection timed out"). + // This is transient: gRPC will reconnect on the next attempt. + if code == codes.Unavailable { + return true + } + if strings.Contains(err.Error(), "please retry for collection in finalized block") { return true } diff --git a/scanner/output_handler.go b/scanner/output_handler.go index 1627a9e..2c85ebc 100644 --- a/scanner/output_handler.go +++ b/scanner/output_handler.go @@ -35,7 +35,7 @@ func NewScriptResultProcessor( handler ScriptResultHandler, ) *ScriptResultProcessor { r := &ScriptResultProcessor{ - resultsChan: make(chan ProcessedAddressBatch, 10000), + resultsChan: make(chan ProcessedAddressBatch, 500), handler: handler, log: logger.With().Str("component", "script_result_processor").Logger(), }