Troubleshooting

CAPTCHA_NOT_READY: Timeout and Polling Strategy Guide

CAPCHA_NOT_READY is not an error — it means CaptchaAI is still solving. The key is polling at the right interval and setting appropriate timeouts per CAPTCHA type.


Understanding CAPCHA_NOT_READY

When you poll res.php and receive CAPCHA_NOT_READY, the task is still being processed. This is normal behavior, not a failure.

{"status": 0, "request": "CAPCHA_NOT_READY"}

What to do: Wait and poll again. Don't resubmit.


CAPTCHA Type Typical Solve Time Recommended Timeout Poll Interval
Image/OCR 2-8 seconds 30 seconds 3 seconds
reCAPTCHA v2 10-30 seconds 90 seconds 5 seconds
reCAPTCHA v3 8-20 seconds 60 seconds 5 seconds
Invisible reCAPTCHA 10-30 seconds 90 seconds 5 seconds
reCAPTCHA Enterprise 15-45 seconds 120 seconds 5 seconds
Cloudflare Turnstile 5-15 seconds 60 seconds 5 seconds
GeeTest v3 10-30 seconds 90 seconds 5 seconds
BLS 5-20 seconds 60 seconds 5 seconds

Optimal Polling Implementation

import time
import requests


# Type-specific settings
POLL_CONFIG = {
    "base64": {"timeout": 30, "interval": 3, "first_check": 5},
    "post": {"timeout": 30, "interval": 3, "first_check": 5},
    "userrecaptcha": {"timeout": 90, "interval": 5, "first_check": 15},
    "turnstile": {"timeout": 60, "interval": 5, "first_check": 10},
    "geetest": {"timeout": 90, "interval": 5, "first_check": 15},
    "bls": {"timeout": 60, "interval": 5, "first_check": 10},
}


def poll_result(api_key, task_id, method="userrecaptcha"):
    """Poll for result with type-appropriate timing."""
    config = POLL_CONFIG.get(method, {"timeout": 90, "interval": 5, "first_check": 15})

    # Wait before first poll (CAPTCHA can't be solved instantly)
    time.sleep(config["first_check"])

    start = time.time()
    poll_count = 0

    while time.time() - start < config["timeout"]:
        resp = requests.get("https://ocr.captchaai.com/res.php", params={
            "key": api_key,
            "action": "get",
            "id": task_id,
            "json": 1,
        }, timeout=15)
        data = resp.json()
        poll_count += 1

        if data["request"] == "CAPCHA_NOT_READY":
            time.sleep(config["interval"])
            continue

        if data.get("status") == 1:
            elapsed = time.time() - start
            print(f"Solved in {elapsed:.1f}s ({poll_count} polls)")
            return data["request"]

        # Actual error
        raise RuntimeError(f"Solve error: {data['request']}")

    raise TimeoutError(
        f"Timeout after {config['timeout']}s ({poll_count} polls)"
    )

Common Mistakes

Mistake 1: Polling Too Frequently

# BAD — polling every 1 second wastes resources
while True:
    time.sleep(1)  # Too fast
    result = check(task_id)

# GOOD — 5 second interval
while True:
    time.sleep(5)  # Appropriate
    result = check(task_id)

Mistake 2: Polling Immediately After Submit

# BAD — first poll at 0 seconds
task_id = submit(...)
result = poll(task_id)  # Immediately polls, wastes a call

# GOOD — wait before first poll
task_id = submit(...)
time.sleep(15)  # Wait for solver to start
result = poll(task_id)

Mistake 3: Timeout Too Short

# BAD — gives up after 20 seconds (many CAPTCHAs take longer)
for _ in range(4):  # 4 × 5s = 20s
    time.sleep(5)
    # ...

# GOOD — adequate timeout
for _ in range(18):  # 18 × 5s = 90s
    time.sleep(5)
    # ...

Mistake 4: Resubmitting on NOT_READY

# BAD — submitting a new task when the old one is still working
if result == "CAPCHA_NOT_READY":
    new_task = submit(...)  # Don't do this

# GOOD — keep polling the same task
if result == "CAPCHA_NOT_READY":
    time.sleep(5)
    continue

Adaptive Polling

Start slow, speed up as expected solve time approaches:

def adaptive_poll(api_key, task_id, expected_time=30, timeout=120):
    """Poll with adaptive intervals."""
    start = time.time()

    # Phase 1: Wait before first poll
    time.sleep(min(expected_time * 0.5, 15))

    interval = 5  # Start at 5s intervals

    while time.time() - start < timeout:
        resp = requests.get("https://ocr.captchaai.com/res.php", params={
            "key": api_key, "action": "get",
            "id": task_id, "json": 1,
        }, timeout=15)
        data = resp.json()

        if data["request"] != "CAPCHA_NOT_READY":
            if data.get("status") == 1:
                return data["request"]
            raise RuntimeError(data["request"])

        elapsed = time.time() - start

        # After expected time, poll more frequently
        if elapsed > expected_time:
            interval = 3
        # After 2x expected, even more frequently
        if elapsed > expected_time * 2:
            interval = 2

        time.sleep(interval)

    raise TimeoutError("Poll timeout")

Troubleshooting

Issue Cause Fix
Always times out Timeout too short Match timeout to CAPTCHA type (see table)
Excessive API calls Polling too frequently Use 5s intervals minimum
First poll succeeds Image CAPTCHA is fast Reduce first_check for image types
Solve takes > 90 seconds Complex CAPTCHA / high load Increase timeout; check during off-peak

FAQ

How long should I wait before the first poll?

Wait 10-15 seconds for reCAPTCHA/Turnstile, 5 seconds for image CAPTCHAs. Polling before the solver even starts is wasted.

Is there a maximum number of polls allowed?

No hard limit on poll requests, but excessive polling (every 1 second) may trigger rate limiting. Use 5-second intervals.

What if CAPCHA_NOT_READY continues beyond the timeout?

The task likely failed to match a solver. Set a reasonable timeout and submit a new task if the original times out.



Poll smarter — start with CaptchaAI.

Discussions (0)

No comments yet.

Related Posts

Tutorials Streaming Batch Results: Processing CAPTCHA Solutions as They Arrive
Process CAPTCHA solutions the moment they arrive instead of waiting for tasks to complete — use async generators, event emitters, and callback patterns for stre...

Process CAPTCHA solutions the moment they arrive instead of waiting for all tasks to complete — use async gene...

Automation Python All CAPTCHA Types
Apr 07, 2026
DevOps & Scaling Blue-Green Deployment for CAPTCHA Solving Infrastructure
Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switching, and rollback strategies with Captcha AI.

Implement blue-green deployments for CAPTCHA solving infrastructure — zero-downtime upgrades, traffic switchin...

Automation Python All CAPTCHA Types
Apr 07, 2026
Reference CAPTCHA Solving Performance by Region: Latency Analysis
Analyze how geographic region affects Captcha AI solve times — network latency, proxy location, and optimization strategies for global deployments.

Analyze how geographic region affects Captcha AI solve times — network latency, proxy location, and optimizati...

Automation Python All CAPTCHA Types
Apr 05, 2026
DevOps & Scaling Ansible Playbooks for CaptchaAI Worker Deployment
Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates, and health checks across your server fleet.

Deploy and manage Captcha AI workers with Ansible — playbooks for provisioning, configuration, rolling updates...

Automation Python All CAPTCHA Types
Apr 07, 2026
Tutorials Bulkhead Pattern: Isolating CAPTCHA Solving Failures
Apply the bulkhead pattern to isolate CAPTCHA solving failures — partition resources into independent pools so a slow or failing solver type doesn't starve othe...

Apply the bulkhead pattern to isolate CAPTCHA solving failures — partition resources into independent pools so...

Automation Python All CAPTCHA Types
Apr 07, 2026
Tutorials Discord Webhook Alerts for CAPTCHA Pipeline Status
Send CAPTCHA pipeline alerts to Discord — webhook integration for balance warnings, error spikes, queue status, and daily summary reports with Captcha AI.

Send CAPTCHA pipeline alerts to Discord — webhook integration for balance warnings, error spikes, queue status...

Automation Python All CAPTCHA Types
API Tutorials Graceful Degradation When CAPTCHA Solving Fails
Keep your automation running when CAPTCHA solving fails — fallback strategies, queue-based retries, and degraded-mode patterns.

Keep your automation running when CAPTCHA solving fails — fallback strategies, queue-based retries, and degrad...

Automation Python All CAPTCHA Types
Apr 06, 2026
Tutorials CaptchaAI Webhook Security: Validating Callback Signatures
Secure your Captcha AI callback/pingback endpoints — validate request origins, implement HMAC signatures, and protect against replay attacks.

Secure your Captcha AI callback/pingback endpoints — validate request origins, implement HMAC signatures, and...

Automation Python All CAPTCHA Types
Feb 15, 2026
Tutorials Profiling CAPTCHA Solving Bottlenecks in Python Applications
Profile Python CAPTCHA solving scripts to identify bottlenecks — timing breakdowns, c Profile, line_profiler, and async profiling for Captcha AI integrations.

Profile Python CAPTCHA solving scripts to identify bottlenecks — timing breakdowns, c Profile, line_profiler,...

Automation Python All CAPTCHA Types
Apr 04, 2026
Explainers Rate Limiting CAPTCHA Solving Workflows
Sending too many requests too fast triggers blocks, bans, and wasted CAPTCHA solves.

Sending too many requests too fast triggers blocks, bans, and wasted CAPTCHA solves. Smart rate limiting keeps...

Automation Python Web Scraping
Apr 04, 2026
Troubleshooting Turnstile Token Invalid After Solving: Diagnosis and Fixes
Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI.

Fix Cloudflare Turnstile tokens that come back invalid after solving with Captcha AI. Covers token expiry, sit...

Python Cloudflare Turnstile Web Scraping
Apr 08, 2026
Troubleshooting GeeTest v3 Error Codes: Complete Troubleshooting Reference
Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with causes, fixes, and Captcha AI-specific troubleshooting.

Complete reference for Gee Test v 3 error codes — from registration failures to validation errors — with cause...

Automation Testing GeeTest v3
Apr 08, 2026