Skip to content

Add per-request memory cap via#626

Merged
Baskarayelu merged 5 commits into
CredenceOrg:mainfrom
RemmyAcee:add-per-request
Jun 27, 2026
Merged

Add per-request memory cap via#626
Baskarayelu merged 5 commits into
CredenceOrg:mainfrom
RemmyAcee:add-per-request

Conversation

@RemmyAcee

Copy link
Copy Markdown
Contributor

Close: #581
implemented:

  1. Added new config option in src/config/index.ts : NODE_MAX_OLD_SPACE_SIZE_MB environment variable for setting memory limit
  2. Updated .env.example : Added documentation for NODE_MAX_OLD_SPACE_SIZE_MB
  3. Added OOM metrics in src/middleware/metrics.ts : New oom_events_total counter metric and recordOomEvent() function
  4. Added event listeners in src/index.ts : Listens for uncaught exceptions and unhandled rejections, increments metric when heap out of memory is detected
  5. Updated Dockerfile : Added entrypoint script to set --max-old-space-size automatically based on NODE_MAX_OLD_SPACE_SIZE_MB
  6. Added entrypoint.sh : Script that configures Node.js options
  7. Updated docs/monitoring.md : Added Memory & OOM Metrics section and Memory Configuration section with examples
  8. Created PRODUCTION.md : New file documenting recommended production memory configuration

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@RemmyAcee Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Baskarayelu

Copy link
Copy Markdown
Contributor

Add per-request memory cap via — nice work, merging 👍

@Baskarayelu Baskarayelu merged commit b11b709 into CredenceOrg:main Jun 27, 2026
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.

Add per-request memory cap via --max-old-space-size

2 participants