Skip to content

feat: enable memory profiling#1927

Merged
epipav merged 10 commits into
mainfrom
tmp/enable-memory-profiling
May 22, 2026
Merged

feat: enable memory profiling#1927
epipav merged 10 commits into
mainfrom
tmp/enable-memory-profiling

Conversation

@epipav
Copy link
Copy Markdown
Collaborator

@epipav epipav commented May 21, 2026

No description provided.

epipav added 2 commits May 20, 2026 09:38
Signed-off-by: anilb <epipav@gmail.com>
Signed-off-by: anilb <epipav@gmail.com>
Copilot AI review requested due to automatic review settings May 21, 2026 08:26
@epipav epipav changed the title Enable memory profiling feat: enable memory profiling May 21, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conventional Commits FTW!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Node.js heap snapshotting in the frontend production container to support memory profiling / investigation of high-memory conditions.

Changes:

  • Adds a /app/heapdumps directory intended to persist heap snapshots.
  • Updates the runtime command to enable --heapsnapshot-near-heap-limit and --heapsnapshot-signal=SIGUSR2.
  • Changes the container working directory to /app/heapdumps so snapshots are written there by default.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/Dockerfile Outdated
Comment thread frontend/Dockerfile
Comment thread frontend/Dockerfile Outdated
Signed-off-by: anilb <epipav@gmail.com>
@epipav
Copy link
Copy Markdown
Collaborator Author

epipav commented May 21, 2026

@copilot review

Copilot AI review requested due to automatic review settings May 21, 2026 12:24
@epipav epipav review requested due to automatic review settings May 21, 2026 12:24
Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

@copilot review

Updated in 07c7aa2: I clarified the Dockerfile runtime comment to avoid implying a guaranteed PVC mount and added an explicit note that mounted /app/heapdumps volumes need write permissions set via securityContext/fsGroup or an initContainer.

Copilot finished work on behalf of epipav May 21, 2026 12:25
@epipav epipav force-pushed the tmp/enable-memory-profiling branch from 07c7aa2 to 1aa0e99 Compare May 21, 2026 12:31
Copilot AI review requested due to automatic review settings May 21, 2026 12:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread frontend/Dockerfile Outdated
Comment thread frontend/Dockerfile Outdated
epipav added 2 commits May 21, 2026 14:56
Signed-off-by: anilb <epipav@gmail.com>
Signed-off-by: anilb <epipav@gmail.com>
Copilot AI review requested due to automatic review settings May 22, 2026 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread frontend/Dockerfile
Comment thread frontend/Dockerfile
Comment thread frontend/Dockerfile Outdated
Copilot AI review requested due to automatic review settings May 22, 2026 16:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread frontend/Dockerfile
Comment on lines 84 to +87
chown -R nuxt:nodejs /app

RUN mkdir -p /app/heapdumps && chown nuxt:nodejs /app/heapdumps

Comment thread frontend/Dockerfile
Comment on lines +95 to +97
# When enabled, cd into the heapdumps volume mount so snapshots land there.
# exec replaces sh with node for proper signal handling.
CMD ["/bin/sh", "-c", "if [ \"$HEAP_SNAPSHOT_ENABLED\" = \"1\" ] || [ \"$HEAP_SNAPSHOT_ENABLED\" = \"true\" ]; then cd /app/heapdumps && exec node --heapsnapshot-near-heap-limit=3 --heapsnapshot-signal=SIGUSR2 /app/.output/server/index.mjs; else exec node /app/.output/server/index.mjs; fi"]
Comment thread frontend/Dockerfile
Comment on lines +94 to +97
# Heap snapshots are opt-in: set HEAP_SNAPSHOT_ENABLED=1 to activate.
# When enabled, cd into the heapdumps volume mount so snapshots land there.
# exec replaces sh with node for proper signal handling.
CMD ["/bin/sh", "-c", "if [ \"$HEAP_SNAPSHOT_ENABLED\" = \"1\" ] || [ \"$HEAP_SNAPSHOT_ENABLED\" = \"true\" ]; then cd /app/heapdumps && exec node --heapsnapshot-near-heap-limit=3 --heapsnapshot-signal=SIGUSR2 /app/.output/server/index.mjs; else exec node /app/.output/server/index.mjs; fi"]
@epipav epipav merged commit adf20a3 into main May 22, 2026
11 checks passed
@epipav epipav deleted the tmp/enable-memory-profiling branch May 22, 2026 16:37
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.

3 participants