Skip to content

Fix Zammad ticket sync timeout failures with configurable retry logic#724

Draft
gdsanger with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failed-fetch-ticket-details
Draft

Fix Zammad ticket sync timeout failures with configurable retry logic#724
gdsanger with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failed-fetch-ticket-details

Conversation

Copilot AI commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

Zammad worker failing to fetch ticket details with "Request timeout" errors after 30 seconds. Added configurable timeout (default: 60s) and retry logic with exponential backoff.

Changes

  • Configurable settings in Settings model:

    • zammad_api_timeout (default: 60s)
    • zammad_max_retries (default: 3)
  • Retry logic in ZammadSyncService._make_request():

    • Exponential backoff (1s, 2s, 4s) for Timeout and ConnectionError
    • HTTP errors (4xx/5xx) are not retried
# Before: hardcoded 30s timeout, no retries
REQUEST_TIMEOUT = 30

# After: configurable with retry
self.request_timeout = getattr(settings, 'zammad_api_timeout', 60)
self.max_retries = getattr(settings, 'zammad_max_retries', 3)

for attempt in range(self.max_retries):
    try:
        response = requests.request(..., timeout=self.request_timeout)
    except requests.exceptions.Timeout:
        wait_time = self.RETRY_BACKOFF_FACTOR ** attempt  # 2^attempt
        time.sleep(wait_time)
  • Migration: 0058_add_zammad_timeout_and_retry_settings.py
  • Tests: 8 new tests for retry behavior
  • Docs: Updated ZAMMAD_INTEGRATION_GUIDE.md and ZAMMAD_QUICKREF.md
Original prompt

This section details on the original issue you should resolve

<issue_title>Failed to fetch details for ticket</issue_title>
<issue_description>Der Zammad Worker, der Ticket aus Zammad abholt und in Ideragraph speichert funktioniert nicht mehr.

Auszug aus dem Logfile:


2025-12-02 10:11:27 [ERROR] [zammad_service] - Failed to fetch details for ticket 78: Request timeout
2025-12-02 10:11:57 [ERROR] [zammad_service] - Failed to fetch details for ticket 1619: Request timeout
2025-12-02 10:12:27 [ERROR] [zammad_service] - Failed to fetch details for ticket 1534: Request timeout

Mehr Fehlerinformationen liegen leider nicht vor.</issue_description>

Comments on the Issue (you are @copilot in this section)

@gdsanger Created with IdeaGraph v1.0

Task: http://idea.angermeier.net/tasks/084dbedb-6434-47f1-9bab-9e7ce2826f71</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: gdsanger <59723667+gdsanger@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failed to fetch details for ticket issue Fix Zammad ticket sync timeout failures with configurable retry logic Dec 2, 2025
Copilot AI requested a review from gdsanger December 2, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to fetch details for ticket

2 participants