Error Diagnostics // NodeFlow Diagnostics
Flowise BullMQ Redis Stalled Jobs & Lock Expiration
Enabling MODE=queue solves HTTP timeouts, but misconfigured Redis eviction policies or overloaded workers cause BullMQ jobs to stall and repeat infinitely.
Measured Stack Telemetry & Memory Profile
When a Flowise worker runs a synchronous CPU-heavy PDF parse on the Node event loop for >30 seconds, it cannot renew its BullMQ Redis lock. BullMQ marks the job stalled and re-queues it on another worker—multiplying memory pressure until OOM occurs.
| Subsystem / Signal | Measured Target | Operational Impact |
|---|---|---|
| Required Redis Eviction Policy | noeviction | Prevents silent deletion of active BullMQ keys |
| Safe Worker Concurrency | 2 - 4 per container | Avoids starving Node event loop heartbeats |
| Queue Pruning Env Flags | REMOVE_ON_AGE=86400 | Caps Redis RAM under 1 GB |
Step-by-Step Triage & Config Remediation
- Verify Redis REDIS_URL & healthcheck: Point both flowise-main and flowise-worker to redis://redis:6379 with healthcheck dependencies.
- Prune completed BullMQ jobs: Set REMOVE_ON_AGE=86400 and REMOVE_ON_COUNT=500 so Redis does not fill RAM with old payloads.
- Lower WORKER_CONCURRENCY: Keep WORKER_CONCURRENCY between 2 and 4 per worker container so lock heartbeats never miss.
MODE=queue QUEUE_NAME=flowise-queue REDIS_URL=redis://redis:6379 WORKER_CONCURRENCY=3 REMOVE_ON_AGE=86400 REMOVE_ON_COUNT=500
Diagnostic FAQ
Why did my Flowise queue job run three times?
The worker blocked the event loop during PDF parsing past the BullMQ lock duration, causing another worker to pick up the "stalled" job.
Does Redis need persistent disk volume?
Yes, enable --appendonly yes if you want queued jobs to survive container restarts.