Zackriya-Solutions/meetily · error · anyhow::Error

Cannot start processing: {}

Error message

Cannot start processing: {}

What it means

ParallelProcessor::start_processing polls SystemMonitor::check_resource_constraints before spawning workers. If the system is above the configured memory/CPU/load thresholds (can_proceed == false), it refuses to start and reports the primary constraint string (e.g. memory usage above limit) in the message.

Source

Thrown at frontend/src-tauri/src/whisper_engine/parallel_processor.rs:156

        info!("Calculated safe worker count: {} (system: {}, config: {})",
              safe_count, worker_count, self.config.max_workers);

        Ok(safe_count)
    }

    /// Start parallel processing with resource-aware worker spawning
    pub async fn start_processing(
        &mut self,
        chunks: Vec<AudioChunk>,
        model_name: String,
    ) -> Result<()> {
        info!("Starting parallel processing of {} chunks with model {}",
              chunks.len(), model_name);

        // Check system resources before starting
        let resource_status = self.system_monitor.check_resource_constraints().await?;
        if !resource_status.can_proceed {
            return Err(anyhow!("Cannot start processing: {}",
                             resource_status.get_primary_constraint()
                             .unwrap_or_else(|| "Resource constraints violated".to_string())));
        }

        // Calculate safe worker count
        let safe_worker_count = self.calculate_safe_worker_count().await?;

        // Initialize chunk queue
        {
            let mut queue = self.chunk_queue.write().await;
            queue.pending = chunks;
            queue.processing.clear();
            queue.completed.clear();
            queue.failed.clear();
            queue.retry_queue.clear();
        }

        // Reset state

View on GitHub (pinned to 0281737d87)

Solutions

  1. Wait for the competing workload (summary, other transcription) to finish and retry start_processing
  2. Lower ParallelConfig.max_workers or choose a smaller whisper model to reduce the resource floor
  3. Close memory-heavy applications; read the constraint text in the error to see whether memory or CPU was the blocker
  4. If it persists, compare SystemMonitor thresholds against actual usage in the logs and tune the limits
Defensive patterns

Strategy: retry

Validate before calling

// Caller-side gate mirroring the internal check
let status = system_monitor.check_resource_constraints().await?;
if !status.can_proceed {
    return Err(anyhow!("resources busy: {:?}", status.get_primary_constraint()));
}

Try / catch

match processor.start_processing(chunks, model).await {
    Err(e) if e.to_string().contains("Cannot start processing") => {
        tokio::time::sleep(Duration::from_secs(30)).await; // let competing load drain
        processor.start_processing(chunks, model).await
    }
    other => other,
}

Prevention

When it happens

Trigger: Starting parallel whisper transcription while available RAM is below the threshold or CPU/load is saturated - e.g. a local LLM is loaded and summarizing at the same time, or leftover workers from a previous run still hold resources.

Common situations: Low-RAM machines (about 8 GB) with large whisper models; transcription running concurrently with local LLM summarization; containers/CI with tight cgroup memory limits; heavy background load (builds, backups).

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/090bcb51408f794b. Report an issue: GitHub.