Skip to main content
OPS LIVE NODEFLOW DIAGNOSTICS // FLOWISEAI & LANGFLOW BASELINE: 2026-10-21 | V8 HEAP + REDIS QUEUE MODE + MAKE HYBRID
FlowiseAgent
FlowiseAgent Disclosure: Outbound /go/ links marked rel="sponsored" may earn a referral fee at zero checkout surcharge (Disclosures).
Fix Guides // NodeFlow Diagnostics

Recycling Langflow Celery Workers to Prevent Hangs & RSS Leaks

Adding --max-tasks-per-child=50 and strict concurrency bounds stops Langflow Celery workers from leaking C-extension PDF parser memory indefinitely.

Measured Stack Telemetry & Memory Profile

Because Python document loaders hold fragmented memory across runs, restarting each child worker after 50 completed flows returns 100% of leaked RSS to the Linux kernel with zero Redis queue loss.

Subsystem / SignalMeasured TargetOperational Impact
max-tasks-per-child50 tasksCaps per-worker RSS drift under 1.2 GB
Celery Timeout Window300 secondsTerminates wedged external HTTP tool calls
Recommended Host TierKVM 4 (16 GB) / KVM 8 (32 GB)Clean separation of web, Celery, Redis, Postgres

Step-by-Step Triage & Config Remediation

  1. Enable LANGFLOW_CELERY_ENABLED=true: Point CELERY_BROKER_URL and CELERY_RESULT_BACKEND to your local Redis container.
  2. Enforce --max-tasks-per-child=50: Pass the flag directly in the langflow-celery Docker command.
  3. Set LANGFLOW_WORKER_TIMEOUT=300: Prevent stalled third-party API calls from locking worker slots forever.
LANGFLOW_CELERY_ENABLED=true
CELERY_BROKER_URL=redis://redis:6379/0
CELERY_RESULT_BACKEND=redis://redis:6379/1
LANGFLOW_WORKER_TIMEOUT=300

Diagnostic FAQ

Does worker recycling drop active tasks?

No. Celery only respawns a child process after its current task finishes and acknowledges Redis.

Why not set --concurrency=16 on a 4-vCPU VPS?

Excessive prefork workers multiply baseline Python RSS by 16x and cause instant thrashing.

Related Fix Guides Guides

FlowiseAgent: Size V8 heap & Redis workers before deploying Deploy KVM VPS