Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Use sentry in frontend and backend application of sveltekit. This issue is effecting the backend nodejs build of sveltekit.
Which SDK are you using?
@sentry/sveltekit
SDK Version
9.30.0
Framework Version
@sveltejs/kit 2.22.0
nodejs v22.16.0
Link to Sentry event
No response
Reproduction Example/SDK Setup
I have provided a full repo and steps to reproduce here: https://github.com/tehnrd/sentry-mem-leak
I have also created a video here showing how to reproduce with the repo above: https://www.loom.com/share/144a1120862143378938b78cc7063b13?sid=225abc0f-f229-4887-81d7-1386acb94b72
From AWS when upgraded from 9.27.0 to 9.30.0:

Steps to Reproduce
With this repo:
- Update @sentry/sveltekit to "9.28.1" or higher in package.json
- Run npm i to update the dependencies.
- Run npm build to build the server code.
- Run npm start to start the custom express server
- Open chrome memory inspector in Chrome Broswer: chrome://inspect/#devices
- Select inspect link to open the inspector for the server.
- Select the Memory tab if not already selected.
- Select "Allocations on Timeline"
- Select the Start button
- Run the npm ab command to start a simple Apache Bench GET request loop to the server.
- Monitor the memory usage in the timeline and note it is growing and not being cleared out.
Expected Result
Memory usage should not continue to increase.
Repeating steps above with @sentry/sveltekit 9.28.0
there is no leak.
Actual Result
Memory usage starts to increase and is never freed up.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status