Prompt
Do I need retry support for failed PDF jobs?
Latest observation
Nov 3, 2026
OpenAI APIWeb search: off
Yes—usually you do, but only for the right kinds of failures.
When retry support is worth it
Add retries if your PDF jobs can fail due to:
- temporary network issues
- transient service outages
- queue/worker hiccups
- file storage timeouts
- third-party API rate limits
- brief memory/CPU contention on workers
These failures are often transient, so a retry can turn an otherwise failed job into a successful one without user intervention.
When retries are not enough
Retries won’t help much for permanent failures, like:
- malformed input data
- invalid template/configuration
- missing fonts/assets
- corrupted source files
- authorization/permission errors
- code bugs in the PDF generation logic
For these, you should fail fast and surface the error clearly rather than retrying forever.
Recommended approach
Use a retry policy with:
- a small max attempt count, e.g. 2–5 retries
- exponential backoff with jitter
- idempotent job processing if possible
- a dead-letter queue or failed-job store
- clear error classification: transient vs permanent
Practical rule of thumb
If PDF generation is part of a user-facing workflow or business-critical process, yes, implement retries.
If failures are rare and always caused by bad input, retries may add little value.
If you want, I can help you design a retry policy specifically for your PDF pipeline.