Comfy-Org/ComfyUI · error · ApiServerError

The API service appears unreachable at this time.

Error message

The API service appears unreachable at this time.

What it means

ApiServerError raised when the upload transport fails and retries are exhausted, but _diagnose_connectivity() shows the internet itself is reachable — i.e., the local network is fine and the ComfyUI API service (or its upload endpoint) is unreachable or rejecting connections. Chained from the original aiohttp.ClientError/OSError.

Source

Thrown at comfy_api_nodes/util/upload_helpers.py:376

                    error_message=f"{type(e).__name__}: {str(e)} (will retry)",
                )
                await sleep_with_interrupt(
                    delay,
                    cls,
                    wait_label,
                    start_ts,
                    None,
                    display_callback=_display_time_progress if wait_label else None,
                )
                delay *= retry_backoff
                continue

            diag = await _diagnose_connectivity()
            if not diag["internet_accessible"]:
                raise LocalNetworkError(
                    "Unable to connect to the network. Please check your internet connection and try again."
                ) from e
            raise ApiServerError("The API service appears unreachable at this time.") from e
        finally:
            stop_evt.set()
            if monitor_task:
                monitor_task.cancel()
                with contextlib.suppress(Exception):
                    await monitor_task
            if sess:
                with contextlib.suppress(Exception):
                    await sess.close()


def _generate_operation_id(method: str, url: str, attempt: int, op_uuid: str) -> str:
    try:
        parsed = urlparse(url)
        slug = (parsed.path.rsplit("/", 1)[-1] or parsed.netloc or "upload").strip("/").replace("/", "_")
    except Exception:
        slug = "upload"
    return f"{method}_{slug}_{op_uuid}_try{attempt}"

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Wait a few minutes and retry — provider outages usually resolve; the helper already exhausted its retry budget.
  2. Check the ComfyUI API status page or forums for incidents.
  3. Inspect request_logger entries for the underlying ClientError to confirm which host is failing.
  4. If persistent, capture the chained exception detail and report it to the API service.
Defensive patterns

Strategy: retry

Try / catch

from comfy_api_nodes.util.common_exceptions import ApiServerError
try:
    await upload_image_to_comfyapi(cls, image)
except ApiServerError:
    await asyncio.sleep(60)
    await upload_image_to_comfyapi(cls, image)  # one manual backoff retry

Prevention

When it happens

Trigger: aiohttp.ClientError/OSError after max_retries while general internet connectivity checks pass; diag['internet_accessible'] is True so ApiServerError('The API service appears unreachable at this time.') is raised at upload_helpers.py:376.

Common situations: ComfyUI API backend outage or maintenance; regional CDN issues; upload endpoint specifically blocked/down while the rest of the site works; transient provider-side failures that outlast the built-in retry window; S3/presigned-upload host unreachable.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/a7e6bff07d0c84f1. Report an issue: GitHub.