Skip to content

ERR_CONVERSION_TIMEOUT β€” Conversion Timeout

HTTP Status: 504 Retryable: Yes Automatic retry: The stale processing detector in routes/files.ts auto-fails files stuck in β€œprocessing” for more than 12 minutes.

What the User Sees

Conversion timed out. The document may be too complex. (ERR_CONVERSION_TIMEOUT)

What Causes This Error

The entire conversion pipeline exceeded the allowed processing time. For Cloudflare Workers, the CPU time limit is 30 seconds on the free tier or 15 minutes on the paid tier. For chunked async conversions, individual chunks have their own timeouts that contribute to the overall time.

This is different from Marker or Mathpix timeouts β€” those are specific to the third-party API processing step. This error covers the overall pipeline including: PDF preprocessing, page image generation, AI vision calls, HTML generation, iterative refinement passes, and output assembly.

Very complex documents that trigger many refinement iterations in the agentic vision converter are the most common cause. Dense pages with tables, charts, and mixed content may require multiple AI passes per page, and the cumulative time can exceed limits.

The stale processing detector provides a safety net: if a file remains in β€œprocessing” status for more than 12 minutes without updates, it is automatically marked as failed. This prevents files from being permanently stuck.

Resolution Steps

For Users

  1. Try again with fewer pages using page ranges. Converting 10 pages at a time is more reliable than converting 100 at once.
  2. Use the β€œbudget” quality tier for faster processing β€” it skips some refinement passes and uses faster models.
  3. Split the document into smaller files using a PDF splitter tool.
  4. If specific pages are very complex (large tables, dense charts), try converting those pages individually.

For Administrators

  1. Check if the Worker is on the Cloudflare paid plan (15-minute CPU limit vs 30-second free tier limit).
  2. Monitor conversion times in Grafana. Identify document types or sizes that consistently time out.
  3. If a specific document type consistently times out, investigate the pipeline logs for that file to identify which step is taking the most time.
  4. Consider reducing maxIterations in the agentic vision converter config to limit refinement passes at the cost of output quality.
  5. The stale processing timeout (12 minutes) is defined in routes/files.ts. Adjust if the Worker plan supports longer execution times.
  6. Review whether the conversion pipeline can be optimized β€” parallel chunk processing, faster models, or reduced image resolution for page rendering.