Skip to content

BuildNot yet confirmed elsewhere1 publisher3 min readPublished

Build concurrency on one VPS is a division problem, and the app you serve pays the remainder

Roughly 2 GB per JavaScript build, a hard failure floor at 2 GB of RAM, and a formula that subtracts headroom first. Exceed it and the 504s land on sites nobody was deploying.

The Engineer · Build desk

How we use AISend a correction

What happened

  • An install-and-build of a Next.js, Nuxt, Remix or React Router project wants roughly 2 GB of RAM at peak.
  • Below 2 GB of RAM the build fails outright, not intermittently and not only under load.
  • The sizing rule is available memory while the site is serving, minus headroom, divided by measured peak per build.
  • The first thing to break is other traffic, showing up as 504s on sites that were not being deployed.

Why it matters

  • exposure Your instrumentation points at the wrong subsystem: the deploy pipeline reports success while the capacity error surfaces as unrelated app latency, so the incident gets triaged as an app problem.
  • constraint Core count stops being a sizing input, which means paying for more vCPU buys no additional concurrency on a memory-bound box.
  • decision The choice is whether to establish the ceiling in a scoped test run or to discover it during a live deploy with customers attached.
  • cost The Node bill is charged per front end rather than per project, so adding a bundler to a cheap PHP deploy quietly reprices the whole server.

The numerator is where this usually goes wrong, because it gets read off an idle box. `free -m` prints two columns and only one of them is the answer: `available`, because it counts the page cache the kernel will hand back under pressure [5]. Then subtract everything that is only true mid-deploy. The app you are replacing is still running, which is what zero-downtime means [9]. On a Node project the new process comes up on a standby port and is soaked for 60 seconds before nginx switches and the old worker drains, so for that window the machine holds both copies [10]. The PHP-FPM pool sizes itself to traffic rather than to your deploy schedule [11], and the database will not give its buffers back because a bundler asked [12]. Build concurrency is spent out of whatever survives that subtraction [13], which means the real peak during a soak is the build plus two resident copies of the app, not the build figure alone [18].

The denominator needs the same suspicion. `/usr/bin/time -v` reports the maximum resident set size of the largest single process, not the sum of what was running, so a bundler forking parallel workers goes past it and the number is a floor [7]. The full path matters, since the shell builtin has no `-v` [6]. What settles it is a ceiling: `systemd-run --scope -p MemoryMax=2G npm run build` fails the way the server will fail [14], and a build that completes inside 2 GB means two of them fit in 4 GB free [15].

The comfortable rows are not the maximum, and the gap between them is where the damage lives. Five builds start on the 8 GB row and will probably finish [21]. At roughly 2 GB each that is about 10 GB of demand on a box that holds 8, before the served apps and the database are counted [22]. Nothing refuses. Memory pressure rises across the machine, the apps already serving traffic get squeezed, the deploys themselves slow down competing for the same memory, and the symptom you see is 504s on sites nobody was deploying [3]. Build failures come later, if they come [4].

This is also why core count is a bad input. Bundling and type-checking saturate RAM long before CPU [16], and the two starvation modes are not symmetric: a build short of CPU finishes late, a build short of memory dies, or kills something else on the box [17]. Counting projects gets sizing wrong in both directions; counting peak RSS does not [8]. A Laravel deploy that is `composer install` and a migration is cheap in memory terms, but add a Vite front end and it runs `npm ci && npm run build` and pays the Node price like anything else [20]. Framework choice moves the rows too: Astro is light enough to take the 8 GB row to four, while Next.js is heavier than most [19]. And the 2 GB floor is not a rule of thumb [25]. At that tier one build wants the entire machine, leaving nothing for the kernel, the app still serving, or the database [26].

What to watch

  • Whether the roughly 2 GB per-build figure survives the next framework majors, since a bundler that adds worker parallelism moves the divisor with no announcement.
  • Per-framework peak RSS numbers measured under a MemoryMax ceiling rather than on idle hardware, which would replace the published rows with something defensible.
  • Whether hosts and deploy tools start enforcing per-deploy memory ceilings, so a runaway build is killed instead of the neighbouring app.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence38
Adoption
Insufficient
Hype gap+28
Incentives62
Confidence45
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    Concurrent build capacity is not a property of the deployment tool; it is the server's available memory divided by what one build takes at its peak.

  2. [2]

    The stated formula is: concurrent builds = (RAM available while the site is serving - headroom) / peak RAM per build.

  3. [3]

    What changes first is not the build: memory pressure rises across the whole machine, applications already serving traffic get squeezed, deploys get slower as they compete for the same memory, and the visible symptom is 504s on sites nobody was deploying.

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 26, 2026

    How Many Builds Can Run at Once on One VPS

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

  • Single-VPS capacity planningFollow
  • Noisy-neighbour failure on shared hostsFollow
  • JavaScript build memory footprintFollow
  • Linux memory diagnostics and OOM forensicsFollow
  • Zero-downtime deploy overheadFollow
Loading related stories