Prompt

How do I queue and retry failed crawl requests?

Technology / Cloud Infrastructure1 observationLast seen Oct 4, 2026

Latest observation

Oct 4, 2026OpenAI APIWeb search: off

To queue and retry failed crawl requests, the usual pattern is:

  1. Persist each crawl request in a durable queue or database with a status field.
  2. Process jobs asynchronously with a worker.
  3. Mark failures and increment a retry counter.
  4. Re-enqueue with backoff until a max retry limit is reached.
  5. Move permanently failed jobs to a dead-letter queue or error table for inspection.

Common design

Job record fields

Store something like:

  • id
  • url
  • status = queued | processing | failed | succeeded | dead
  • retry_count
  • max_retries
  • next_attempt_at
  • last_error
  • created_at
  • updated_at

Processing flow

  1. Worker pulls a job where:
    • status = queued
    • next_attempt_at <= now()
  2. Worker attempts crawl.
  3. If success:
    • set status = succeeded
  4. If failure:
    • increment retry_count
    • if retry_count < max_retries:
      • set status = queued
      • set next_attempt_at = now() + backoff
    • else:
      • set status = dead

Retry strategy

Use exponential backoff to avoid hammering the target or your own system:

  • 1st retry: after 1 minute
  • 2nd retry: after 5 minutes
  • 3rd retry: after 15 minutes
  • 4th retry: after 1 hour

Add jitter so many failed jobs don’t retry at exactly the same time.

Example pseudocode

def process_job(job):
    try:
        crawl(job.url)
        job.status = "succeeded"
        job.last_error = None
    except Exception as e:
        job.retry_count += 1
        job.last_error = str(e)

        if job.retry_count < job.max_retries:
            job.status = "queued"
            job.next_attempt_at = now() + backoff(job.retry_count)
        else:
            job.status = "dead"

    save(job)

If you’re using a queue system

Redis / Celery / Sidekiq / BullMQ / RabbitMQ

Most queue frameworks already support retries:

  • Celery: retry, autoretry_for, countdown
  • Sidekiq: automatic retries + dead jobs
  • BullMQ: attempts, backoff, stalled job handling
  • AWS SQS: visibility timeout + redrive policy

For example, in BullMQ you can set:

  • attempts: 5
  • backoff: { type: 'exponential', delay: 1000 }

Best practices

  • Retry only transient failures: timeouts, 429s, 5xx, network errors.
  • Don’t retry on permanent failures: invalid URL, 404 if you consider it terminal, auth failure, robots denial.
  • Log the failure reason for each retry.
  • Use rate limiting to avoid getting blocked.
  • Deduplicate requests so the same URL isn’t crawled repeatedly in parallel.
  • Add observability: counts of queued, failed, retried, dead jobs.

If you want, I can show this in a specific stack like Python/Celery, Node/BullMQ, Go, or SQL-only.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.