Skip to content

chore(deploy): run a second executor and raise executor memory to 4 GB - #103

Merged
maaaathis merged 1 commit into
mainfrom
chore/deploy-second-executor
Nov 19, 2026
Merged

maaaathis merged 1 commit into
mainfrom
chore/deploy-second-executor

Conversation

@ntdoJanneck

Copy link
Copy Markdown
Member

What

  • Adds a second executor service (executor-2) to deploy/stack.yaml, so two scans can run in parallel.
  • Raises the memory limit of each executor from 2 GB to 4 GB (CPU stays at 2 per executor).

Why it's safe to run two executors

Each executor claims the next queued scan with Scan.getNextPending(), which is a single findOneAndUpdate (queued → running). MongoDB applies that atomically, so the same scan is never picked up by both executors. There is no startup logic that resets running scans, so the executors don't interfere with each other on restart.

Notes for review

  • The second executor is a separate service instead of replicas, because the stack is applied through the mittwald UpdateStack API, which is service-based. Both services have to be kept in sync by hand (there's a comment in the file).
  • Total limits of the stack go from 3.5 CPU / 3.5 GB to 5.5 CPU / 9.5 GB (web 0.5/512 MB, 2× executor 2/4 GB, mongo 1/1 GB). Please check that the project's container hosting plan covers that.
  • Like every stack change, this only takes effect with the next release tag deploy.

🤖 Generated with Claude Code

Adds an identical "executor-2" service so scans run in parallel. Scans are
claimed atomically via findOneAndUpdate, so no scan is picked up twice.
Both executors get a 4 GB memory limit (was 2 GB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maaaathis
maaaathis merged commit b30e174 into main Nov 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants