The background processing worker shows steady memory growth (~20MB/hour) that eventually triggers OOM restarts after ~48 hours of uptime.
Observed in production via memory metrics — heap usage grows linearly with no plateau.
Likely causes:
- Event listeners added in the processing loop but never removed
- Accumulated references in the job queue not being garbage collected
- Large response bodies being held in closure scope longer than needed
Reproduction: run the worker locally with node --inspect and take heap snapshots at 0, 30, and 60 minutes to identify retained objects.
The background processing worker shows steady memory growth (~20MB/hour) that eventually triggers OOM restarts after ~48 hours of uptime.
Observed in production via memory metrics — heap usage grows linearly with no plateau.
Likely causes:
Reproduction: run the worker locally with
node --inspectand take heap snapshots at 0, 30, and 60 minutes to identify retained objects.