Repository navigation
Fix: Hardening AMQP failure handling and daisy worker logging - #29
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A critical transport-failure path ignores the failed publication result and removes the retracing marker after acknowledging the input, leaving no queued retry or recovery path.
1 open issue
What changed in this PR
This PR hardens Error Tracker’s shared AMQP helpers and adds diagnostics for Daisy worker timeouts, improving failure handling and visibility into blocked workers.
Changes:
- Classifies recoverable transport failures, adds a 10-second connection timeout, and cleans up failed cached connections.
- Protects queue operations and cleanup, with regression tests for connection lifecycle and failure behavior.
- Logs Python thread stacks when Gunicorn aborts a worker and documents how to inspect them.
Draft commit message: fix: harden AMQP failure handling and Daisy timeout diagnostics
| File | Description |
|---|---|
src/tests/test_amqp_utils.py |
Adds tests for connection reuse, failure classification, queue operations, and cleanup. |
src/errortracker/amqp_utils.py |
Hardens connection management, queue error handling, and logging. |
src/daisy/gunicorn_config.py |
Adds an abort hook that logs worker PID and thread stacks. |
README.md |
Documents timeout diagnostics and journal inspection. |
Review effort: Balanced
Hyask
reviewed
Nov 24, 2026
Hyask
left a comment
Member
There was a problem hiding this comment.
This looks pretty good in overall.
Small nitpick: you wrote a good commit message in the PR description, but not in the commit itself. Can we get the opposite?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Improve AMQP connection and queue-operation failure handling, and capture Python stack traces when Gunicorn aborts a Daisy worker.
Motivation
Daisy workers have reported
WORKER TIMEOUTmessages around the same time RabbitMQ reports unexpectely closed TCP connections, without an application traceback.A worker terminated while blocked may never reach the AMQP exception handler.
Changes