Define timeouts for document conversion jobs
18 November 2025
A client reports that a slow conversion timed out. The worker completes a moment later and writes the PDF. Submitting the file again could now create two outputs. Give the client a way to find the first job before deciding whether a second submission is warranted.
Give each timer a specific meaning
| Timer | What expiry establishes | What the caller should check |
|---|---|---|
| Submission or acknowledgement | The caller stopped waiting for a response. | Query the original request reference. Expiry does not establish that the service rejected the job. |
| Worker execution | The assigned execution budget expired. | Ask the service responsible for execution whether cancellation was requested, acknowledged or too late to prevent completion. |
| Storage download | The client did not finish retrieving the result in time. | Query the committed output identifier and retry a permitted download of that version before considering another conversion. |
Write down when each clock starts, whether it measures elapsed or idle time, who can change it and what state is recorded at expiry. Set values from the workload and the service’s acceptance criteria. A long worker budget and short acknowledgement timer can coexist in an asynchronous service that returns a durable job reference promptly.
Follow the slow file across the boundary
Give the intended operation a stable request reference before submission. Save each transport attempt separately and correlate it with the accepted job and versioned output. The OWASP logging guidance describes the value of an interaction identifier for connecting events. Correlation makes events traceable. It does not itself enforce duplicate suppression.
In the worked case, a status query for the original request returns a completed job with an output version. Retrieve that version using the permitted identity and record the observed result. For a running job, continue observing or issue an authorised cancellation. Record who requested cancellation and whether the worker honoured it before committing the output. A disconnected client does not by itself authorise deletion of a completed result.
Check the retry boundary
Use a controlled slow input to make the client time out first. Then repeat with a worker timeout and, separately, with a slow download. Count committed outputs and any downstream notifications, including when a late completion races with cancellation. If a retry is permitted, reuse the stable operation key with a service-side duplicate check. A momentary “unknown” status is not proof that nothing happened.
Keep the requested limits, acknowledgement times, final job state and committed output record together. The benign upload test worksheet supplies test-planning material. Run this timer sequence against the system being evaluated.
Part of the Assess security controls for PDF uploads guide.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
