Skip to content

Silence noisy alloy_pubsub INFO log: "Pubsub service request channel closed" #1621

Description

@hmzakhalid

Problem

When running interfold start -v (or any log level >= INFO), the logs get spammed with:

INFO Pubsub service request channel closed. Shutting down.

Root Cause

This message originates from alloy-pubsub (the Ethereum WebSocket pub/sub layer inside the alloy provider), specifically its internal service loop:

// alloy-pubsub-1.0.41/src/service.rs:252
req_opt = self.reqs.recv() => {
    if let Some(req) = req_opt {
        // ...
    } else {
        info!("Pubsub service request channel closed. Shutting down.");
        break Ok(())
    }
}

It fires every time an alloy WebSocket provider is dropped. In crates/evm/src/actors/evm_read_interface.rs, when the live event stream ends (WebSocket disconnect, idle timeout, etc.) and MAX_RETRIES_BEFORE_RECREATE (3) is hit, the provider is recreated — dropping the old one and triggering this message. With an unstable RPC connection, this repeats endlessly.

Proposed Fix

In crates/cli/src/helpers/telemetry.rs, replace LevelFilter::from_level(log_level) with tracing_subscriber::filter::Targets that sets alloy_pubsub to WARN while keeping the default at the requested log level:

let targets = Targets::new()
    .with_default(log_level)
    .with_target("alloy_pubsub", Level::WARN);

Apply in both:

  • setup_simple_tracing()
  • setup_tracing() (both OTLP and non-OTLP branches)

This silences the informational "channel closed" message while still showing actual WARN/ERROR logs from alloy_pubsub if something real goes wrong.

Metadata

Metadata

Assignees

Labels

choreSomething we just need to do for organization

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions