Skip to content

Workers that fail unexpectedly leave worker_runs stuck in "running" state, causing phantom progress tracking #156

@lordofwar81

Description

@lordofwar81

When a worker fails unexpectedly (API error, timeout, kill), the worker_runs record stays in "running" forever. The tracking system shows phantom progress for dead workers.

Reproduction:

  1. Spawn a worker that fails (API error, network issue)
  2. Worker dies
  3. Check DB: SELECT * FROM worker_runs WHERE status='running'; — record stuck
  4. Status never updates to "failed"

Expected: Wrap worker execution in error handling that marks DB record as "failed" on any exception.

Workaround:

UPDATE worker_runs SET status='failed', completed_at=datetime('now') WHERE status='running' AND started_at < datetime('now', '-10 minutes');

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