Repository navigation
Size Cap Web's Railway limits to its real use, with headroom - #20
Merged
Merged
Conversation
A week of metrics puts Cap Web at about 1.3 GB and 0.05 vCPU at normal peaks, and 6.8 GB and 2 vCPU during the Loom import. Lower the limit from 32 vCPU / 12 GB to 4 vCPU / 4 GB. NODE_OPTIONS now caps the Node heap at 3 GB (set in Railway) so the heap stays under the new limit.
Railway config plan1 change will apply on merge. ~ Update Cap Web deploy.limitOverride.containers.cpu, deploy.limitOverride.containers.memoryBytesPinned plan — what merge will apply
Merge applies exactly this change set. If the environment moves or Posted by railwayapp/config · Railway Infrastructure as Code |
8 vCPU / 6 GB instead of 4 vCPU / 4 GB, with the Node heap at 4 GB, so normal peaks and moderate bulk work never get throttled. CPU above use costs nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lowers Cap Web's per-replica limit in
.railway/railway.ts(Railway IaC) from 32 vCPU / 12 GB to 8 vCPU / 6 GB.Why these numbers (Railway metrics, 2026-11-06 to 11-13):
The goal is headroom, not the minimum:
Railway bills usage, not the limit, so this caps how far a leak or a runaway job can go rather than lowering the bill.
Order matters. The Node heap was capped at 8 GB, above the new limit, so
NODE_OPTIONSis already set to--max-old-space-size=4096in Railway, and Cap Web was redeployed with it before this merges. For another bulk import, raise both together.Same pass, done in the dashboard because those services are outside the
cap-webpartial:INNODB_BUFFER_POOL_MB=512replaces the 15 GB buffer pool Railway's wrapper sized from the 32 GB container.mysqldwent from 2.26 GB to 414 MB.