mirror of
https://github.com/Dasemu/remote-mcp-manager.git
synced 2026-11-26 23:36:31 +00:00
fix: address review findings on the memory safeguards
- kill the whole process group on git/nixpacks timeout so a hung docker build cannot block the build queue - mark interrupted cloning/building/starting installations as error on boot - keep a running installation served while it rebuilds, including failed builds - time out Docker image calls inside the build queue - make session touch best-effort Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a999b8c694
commit
5fb1d6b0b4
12 files changed
+118
-23
No files matched your search
+2
-1
@@ -15,7 +15,8 @@ limits exist:
|
||||
| Session store | `session/sqliteStore.ts` | Sessions live in the SQLite DB and expired ones are purged every 10 min. Replaces `MemoryStore`, which never evicts and warned it leaks in production. |
|
||||
| Memory guard | `MANAGER_MEMORY_LIMIT_MB` (default 512, 0 = off) | Checked every 30 s on heap + external memory (not RSS, which hides swapped pages). When exceeded the process exits and `restart: unless-stopped` starts a fresh one. |
|
||||
| V8 heap ceiling | `NODE_OPTIONS=--max-old-space-size=768` in the `Dockerfile` | Hard backstop above the soft limit. |
|
||||
| Serialized builds | `service/orchestrator.ts` | One Nixpacks/Docker build at a time; git is killed after 5 min and a build after 30 min. |
|
||||
| Serialized builds | `service/orchestrator.ts` | One Nixpacks/Docker build at a time; git is killed after 5 min and a build after 30 min (the whole process group, so a hung `docker build` can't keep the queue blocked). |
|
||||
| Restart reconciliation | `reconcileInterruptedInstallations` | On boot, `cloning`/`building`/`starting` installations are marked `error` (Start or Redeploy recovers them), since the process that was advancing them is gone. |
|
||||
|
||||
A container-level cgroup limit on the manager (`mem_limit` in compose) would be the strongest
|
||||
guard, but it fails outright on hosts that do not delegate cgroup controllers (see
|
||||
|
||||
Reference in new issue
Block a user