invoke-ai/InvokeAI · error · ServiceInactiveException

The download service is not currently accepting requests…

Error message

The download service is not currently accepting requests. Please call start() to initialize the service.

What it means

submit_download_job() raises ServiceInactiveException when the service flag _accept_download_requests is false, i.e. the service was never started, is stopping, or was stopped. Queueing a job into a dead service would silently lose work, so it fails fast.

Solutions

  1. Call service.start() before submitting any jobs
  2. Check that startup completed (e.g. await app startup/lifespan) before issuing downloads
  3. If the service was stopped, restart it with start() and resubmit
  4. Review shutdown handlers to ensure stop() only runs at true shutdown

Example fix

// before
service.submit_download_job(job)
// after

service.start()
service.submit_download_job(job)
Defensive patterns

Strategy: try-catch

Validate before calling

def service_accepting(s) -> bool:
    return bool(getattr(s, "_accept_download_requests", False))
# only submit when service_accepting(service) is True

Type guard

def is_active(s: object) -> bool:
    return bool(getattr(s, "_accept_download_requests", False))

Try / catch

try:
    service.submit_download_job(job)
except ServiceInactiveException:
    service.start()
    service.submit_download_job(job)

Prevention

When it happens

Trigger: Calling submit_download_job() before start(), after stop(), or during a stop/start transition where _stop_event was set and requests rejected.

Common situations: A download request arrives during app shutdown, a consumer grabs the service before the startup routine ran, or stop() was called by a previous error handler and the service never restarted.

Related errors


AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29). Data as JSON: /api/errors/ed4034983ec22239. Report an issue: GitHub.

Appendix: source

Thrown at invokeai/app/services/download/download_default.py:139

                self._queue.queue.clear()
            self.cancel_all_jobs()
            self._stop_event.set()
            for thread in self._worker_pool:
                thread.join()
            self._worker_pool.clear()

    def submit_download_job(
        self,
        job: DownloadJob,
        on_start: Optional[DownloadEventHandler] = None,
        on_progress: Optional[DownloadEventHandler] = None,
        on_complete: Optional[DownloadEventHandler] = None,
        on_cancelled: Optional[DownloadEventHandler] = None,
        on_error: Optional[DownloadExceptionHandler] = None,
    ) -> None:
        """Enqueue a download job."""
        if not self._accept_download_requests:
            raise ServiceInactiveException(
                "The download service is not currently accepting requests. Please call start() to initialize the service."
            )
        if job.id == -1:
            job.id = self._next_id()
        job.set_callbacks(
            on_start=on_start,
            on_progress=on_progress,
            on_complete=on_complete,
            on_cancelled=on_cancelled,
            on_error=on_error,
        )
        self._jobs[job.id] = job
        self._queue.put(job)

    def pause_job(self, job: DownloadJobBase) -> None:
        """Pause the indicated job, preserving partial downloads."""
        if job.status in [DownloadJobStatus.WAITING, DownloadJobStatus.RUNNING]:
            job.pause()

View on GitHub (pinned to 0b6a024f2f)