No job has a time limit, file transfers over SFTP have no read timeout, and the health check stays green while workers are stuck

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, devops

Research direction

Start with the SFTP adapter at services/pipeline/src/pipeline/connections/adapters/sftp.py and the health.py endpoint, then trace job handler execution and pipeline database configuration. The issue proposes timeouts, retry behavior, statement limits, and readiness checks across several components. Done means a never returning handler is cancelled and retried, and health fails on a stale heartbeat.

Written by the indexing model from the issue text.

Description

bug queue: scale readiness (M3)

Found in the 2026-11-29 whole-repo review. Reported by a reviewer; missing timeouts confirmed by search, the hang itself not reproduced.

Problem

  • No job handler is wrapped in a timeout, and the job library has none of its own.
  • services/pipeline/src/pipeline/connections/adapters/sftp.py sets only a connect timeout — no keep-alive, no read/write timeout.
  • No database statement timeout is set in the pipeline.
  • /health (health.py) returns OK whenever the queue database is reachable; the worker heartbeat is reported but does not affect the result.

How it goes wrong

Four transfers stall behind a firewall that drops idle connections. All four slots of the file-transfer queue hang indefinitely; ingest and delivery stop; health stays green.

Suggested fix

Per-task timeout around every handler; SFTP keep-alive and I/O timeouts; per-role statement timeout; a readiness check that fails on a stale heartbeat or when every slot has been busy for too long.

Acceptance criteria

  • Test: a handler that never returns is cancelled and retried
  • Health check fails when the heartbeat is stale
Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.