fix: drop multipart upload path; ingest with format=pprof - #316
Merged
Conversation
Uploading via FormData+Blob leaks native memory on Node 24.16+/26.x: undici's fetch serializes Blob parts through Blob.prototype.stream(), which pins every payload forever (nodejs/node#63574). An earlier fix (#311) kept multipart and hand-built the body. This change instead removes the multipart path instead and sends the gzipped pprof bytes raw to /ingest?format=pprof which the server parses identically. Fixes #28
4 tasks
bryanhuhta
previously approved these changes
Jul 27, 2026
bryanhuhta
approved these changes
Jul 27, 2026
ZacxDev
added a commit
to civitai/civitai
that referenced
this pull request
Aug 10, 2026
0.6.2 fixes a native memory leak in the profile-upload path: the FormData/Blob upload pinned an ArrayBuffer per flush via undici (grafana/pyroscope-nodejs#316, nodejs/node#63574). The multipart path is replaced by sending the gzipped pprof bytes raw to /ingest?format=pprof. The leak affects Node 24.16+, which is the range this app runs in. This is a precautionary bump onto the upstream fix, not a response to an observed incident. The profiler itself is unchanged: @datadog/pprof stays pinned at exactly 5.14.4 in both versions, so only the SDK's upload path moves. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Uploading via FormData+Blob leaks native memory on Node 24.16+/26.x: undici's fetch serializes Blob parts through Blob.prototype.stream(), which pins every payload forever (nodejs/node#63574). An earlier fix (#311) kept multipart and hand-built the body. This change instead removes the multipart path instead and sends the gzipped pprof bytes raw to /ingest?format=pprof which the server parses identically.
Fixes #28