Render Tutorials
Stock research: from flaky to reliable

Compare and troubleshoot

⏱ 4 min

Run the same ticker on your baseline deploy (before Workflow changes) and on your fork with Workflows (after this tutorial). Same maybeFail in the code. Automatic retries should make the Workflow version complete far more often.

Side-by-side comparison

Baseline (in-process)Your fork with Workflows
searchOneIn-processWorkflow task with retries
Typical outcome~24% full completion~97% full completion (retries, same Promise.all)
Where to debugWeb service logs onlyWeb logs + Workflow Runs tab

What changed and why

Before the service split: one rejection inside Promise.all aborted the full batch in the same web process.

After the service split: each search runs as its own task run with retries, so transient failures are absorbed per search before the web process fans in results for synthesis.

What retries actually fix

Each search still runs inside Promise.all in research.ts. A try/catch around dispatch still rethrows, so one search that exhausts all retry attempts still fails the whole run. The gain is higher end-to-end success probability (maybeFail at 30% per attempt, up to four attempts per search → about 99% per search, about 97% for all four).

To show three successful searches and still synthesize a memo, you would need Promise.allSettled (or similar) instead of Promise.all. This tutorial keeps Promise.all on purpose so the before/after comparison stays simple.

Troubleshooting checklist

Find the symptom that matches what you’re seeing and expand it for the cause and fix.

searchOne not in Tasks tab
  • Confirm tasks/src/index.ts imports ./search.js.
  • Rebuild and redeploy the Workflow.
UI stuck near 50%, Dashboard shows completed
  • You are probably using await started.get() on four parallel runs. Switch to getTaskRun polling (see Trigger task runs from the web).
401 or permission errors on startTask
  • Confirm RENDER_API_KEY on the web service.
  • Confirm WORKFLOW_SERVICE_SLUG matches the Workflow slug exactly.
Exa errors on Workflow runs
  • Ensure EXA_API_KEY is present on both service types: the web service and the Workflow service.
Root directory mistakes
  • Set Root Directory to tasks.

What’s next

What you learned

  • Retries on isolated Workflow runs greatly improve full-run completion; Promise.all still fails the batch if one search exhausts retries
  • Most production issues are slug mismatch, missing API keys, or wrong root directory
  • Your baseline deploy on the fork is the before picture; the same repo holds the Workflow version after