Skip to content

websocket silently stalls, no recovery when connection stays open but stops delivering blocks #2286

@ind-igo

Description

@ind-igo

Version

0.16.3

Current behavior

(disclaimer: claude helped me diagnose this and write this issue)

The noNewBlockWarning timer in runtime/realtime.ts:796 detects when no new block arrives within 30 seconds, but only logs a warning. The WebSocket reconnection logic in rpc/index.ts only triggers on error or close events.

This means a silent WebSocket drop (connection stays open, no TCP error, but the server stops pushing newHeads data) causes the indexer to permanently stall. The for await loop on the generator in realtime.ts:829 blocks forever.

Expected behavior

Should detect if no new blocks are being processed after some time period and throw an error.

Steps to reproduce

Hard to reproduce. Need a ws connection and RPC provider needs to stop propagating blocks.

Link to repository

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions