ruvnet/ruflo · error

Task queue is full

Error message

Task queue is full

What it means

WorkerPool.submit found no available worker and the fallback task queue already holds taskQueueSize entries. Both the worker pool and its overflow buffer are saturated, so the new task cannot be accepted and backpressure is surfaced to the caller immediately.

Source

Thrown at v3/@claude-flow/plugins/src/workers/index.ts:404

    await worker.terminate();
    this._workers.delete(workerId);
    this.poolMetrics.totalWorkers--;

    if (worker.status === 'idle') {
      this.poolMetrics.idleWorkers--;
    } else if (worker.status === 'busy') {
      this.poolMetrics.activeWorkers--;
    }
  }

  async submit(task: WorkerTask): Promise<WorkerTaskResult> {
    // Find available worker
    const worker = this.getAvailableWorker();

    if (!worker) {
      // Queue the task if no worker available
      if (this.taskQueue.length >= this.config.taskQueueSize) {
        throw new Error('Task queue is full');
      }

      return new Promise((resolve, reject) => {
        this.taskQueue.push(task);
        this.poolMetrics.queuedTasks++;

        // Wait for worker to become available
        const checkWorker = setInterval(() => {
          const available = this.getAvailableWorker();
          if (available) {
            clearInterval(checkWorker);
            const idx = this.taskQueue.indexOf(task);
            if (idx !== -1) {
              this.taskQueue.splice(idx, 1);
              this.poolMetrics.queuedTasks--;
            }
            this.executeOnWorker(available, task).then(resolve).catch(reject);
          }

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Apply backpressure: wait or retry when the queue is full.
  2. Increase queue capacity or add workers to drain faster.
  3. Shed low-priority load when the queue saturates.
Defensive patterns

Strategy: validation

When it happens

Trigger: A task is enqueued when the worker task queue has reached its capacity.

Common situations: Producers enqueue faster than workers drain, or queue capacity configured too small.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/92441f45b0a9d85d. Report an issue: GitHub.