Skip to content

Streamer dormancy timeout kills active read session followers #300

@NiklasDah

Description

@NiklasDah

Description

Read sessions following live updates (i.e., caught up to the stream tail with wait=∞) are terminated with StreamerMissingInActionError (503 Unavailable) after 60 seconds of no appends to the stream. This contradicts the documented behavior that unbounded sessions will "follow in real-time for new records" indefinitely.

Reproduce

  1. Create a stream and append some records
  2. Start a read session with no bounds (default wait=∞) — e.g., via SSE or SDK readSession( { start: { seqNum: 0 }, } (according to the docs, this should be a session without bounds: https://s2.dev/docs/api/records/read#follow-live-updates)
  3. Wait 60+ seconds without appending any records
  4. Observe the read session terminate with:
    S2Error: {"code":"unavailable","message":"streamer missing in action"} (status 503)
    

Expected Behavior

An unbounded read session following live updates should remain open indefinitely (or until the client disconnects), as documented:

Once the stream tail is reached, sessions follow real-time for new records if no bounds apply or wait is non-zero.

Actual Behavior

The session is dropped after ~60 seconds of stream inactivity with a 503 Unavailable error.

Notes

This seems to be caused somewhere here:

const DORMANT_TIMEOUT: Duration = Duration::from_secs(60);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions