-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What problem will this feature address?
Dokploy memory usage has increased and this heavily impacts single-node self-hosted instances on low-memory VPS plans (including 4GB RAM class and smaller), causing instability, higher swap pressure when available, and occasional OOM crashs and restarts even under normal usage.
Describe the solution you'd like
Implement a memory-optimization initiative with these changes:
- Monitoring runtime refactor
- Replace async
setIntervalpolling loops with non-overlapping execution. - Use shared per-app collectors for WebSocket subscribers instead of one collector per connection.
- Add adaptive sampling/backoff under pressure (heap growth / event loop lag).
- Enforce in-flight limits so stale ticks are dropped instead of queued.
- Scheduler right-sizing
- Make worker count and concurrency configurable.
- Reduce default scheduler parallelism for low-memory profiles.
- Keep high-throughput mode as an explicit opt-in.
- Monitoring API/data-path hardening
- Remove unbounded
limit=allbehavior in hot monitoring endpoints. - Enforce bounded limits and add pagination for historical reads.
- Improve retention and storage behavior to reduce allocation churn.
- Runtime baseline reduction
- Introduce a low-memory profile preset.
- Add conservative Node memory caps for auxiliary services.
- Add memory reservations/limits for Dokploy internal services where possible.
- Reduce runtime module load by avoiding broad barrel imports in hot paths.
Describe alternatives you've considered
- Keeping current behavior and asking users to scale VPS size: avoids engineering work but does not solve efficiency regressions.
- Disabling monitoring by on high memory pressure: reduces memory but degrades product value.
- Minor tuning only (GC/env tweaks): helpful, but unlikely to be enough without code-path and API changes.
Additional context
Acceptance criteria expected:
- No OOM/restart events in a 24h soak test on low-memory VPS nodes.
- Stable RSS after warm-up for Dokploy core services.
- Monitoring remains functional with adaptive sampling.
- Scheduler/backups/deployments continue to run correctly with new defaults.
Will you send a PR to implement it?
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request