Skip to content

Send keep-alive pings to prevent server idle timeout killing sessions #396

@PureWeen

Description

@PureWeen

Problem

The headless server has an unconfigurable ~35 minute idle timeout. When a session is resumed but not actively used, the server kills it with session.shutdown.

Observed in: ci-agentic session - resumed at 19:38:39, server killed at 20:13:25 (34m 46s idle after resume).

Root Cause

The headless server tracks client inactivity per-session. When no messages flow from the client for ~35 minutes, the server shuts down the session. There is no --session-idle-timeout flag.

Proposed Fix

Send lightweight keep-alive pings every ~10 minutes for sessions PolyPilot considers in use.

Considerations

  • Need to identify the right SDK method for a keep-alive
  • Should NOT interfere with active tool execution or trigger model inference
  • May be an upstream server bug

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions