Title: [Node.js] Excessive memory consumption when large data is stored on `IncomingRequest` object · Issue #14965 · getsentry/sentry-javascript · GitHub
Open Graph Title: [Node.js] Excessive memory consumption when large data is stored on `IncomingRequest` object · Issue #14965 · getsentry/sentry-javascript
X Title: [Node.js] Excessive memory consumption when large data is stored on `IncomingRequest` object · Issue #14965 · getsentry/sentry-javascript
Description: Description A user was reporting 2x-3x memory consumption when using the Node.js SDK. I had a chat with them and will summarize the setup and findings here. SDK setup is a very ordinary express setup with mostly SDK defaults (traces samp...
Open Graph Description: Description A user was reporting 2x-3x memory consumption when using the Node.js SDK. I had a chat with them and will summarize the setup and findings here. SDK setup is a very ordinary express set...
X Description: Description A user was reporting 2x-3x memory consumption when using the Node.js SDK. I had a chat with them and will summarize the setup and findings here. SDK setup is a very ordinary express set...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/14965
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Node.js] Excessive memory consumption when large data is stored on `IncomingRequest` object","articleBody":"### Description\n\nA user was reporting 2x-3x memory consumption when using the Node.js SDK. I had a chat with them and will summarize the setup and findings here.\n\n- SDK setup is a very ordinary express setup with mostly SDK defaults (traces sample rate: 0.5, 0.1 - doesn't matter, leaks more or less equally)\n- Requests to the service are transient\n- No long-running requests or anything\n- Large objects are stored on the `res` object (in particular large array of strings containing identifiers)\n- The memory snapshot shows that `NonRecordingSpan`s and `Span`s are holding references to the `res` object via the `_isolationScope` field.\n- The majority of these references seems to come from `NonRecordingSpan`s.\n- Interestingly, and I don't know if this is somehow relevant, the `NonRecordingSpan`s are held by very deep chains of `Timeout` objects. The user does not define any timeouts manually.\n\nMy hypothesis: We are not cleaning up `NonRecordingSpan`s \"naturally\" and keeping them in the exporter or _somewhere_ and they end up being evicted by a timeout policy. This may be in our code, or this may be in OTELs code.","author":{"url":"https://github.com/lforst","@type":"Person","name":"lforst"},"datePublished":"2025-01-09T16:21:05Z","url":"https://github.com/getsentry/sentry-javascript/issues/14965"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:be659af6-f4d2-0d8c-7e0a-69c5dd5d1a88 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 995A:225229:101577:1631E3:6B0445F9 |
| html-safe-nonce | fc4f3f6240e76cfc4ffe59fa39616289dbc33e2ce4ca7da0080b5488af2171b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTVBOjIyNTIyOToxMDE1Nzc6MTYzMUUzOjZCMDQ0NUY5IiwidmlzaXRvcl9pZCI6IjQyMDk0MzUxNDQ3ODg1NTY3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 56423593fc671888e5cdde3093d662ccda1f56115a9914c8982e8a9b8394e5be |
| hovercard-subject-tag | issue:2778252900 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/14965/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a69739e6f8a71e3aa4c5902f8212df0236e09c3ccf86964a7feaafd87e010649/getsentry/sentry-javascript/issues/14965 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a69739e6f8a71e3aa4c5902f8212df0236e09c3ccf86964a7feaafd87e010649/getsentry/sentry-javascript/issues/14965 |
| og:image:alt | Description A user was reporting 2x-3x memory consumption when using the Node.js SDK. I had a chat with them and will summarize the setup and findings here. SDK setup is a very ordinary express set... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lforst |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width