-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[7.48.0][Node.js] Memory leak #7896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @xr0master, without a reproduction this is really hard for us to debug. The notable change we made was to starting using async hooks in https://github.com/getsentry/sentry-javascript/releases/tag/7.48.0. Could you try updating to |
Also, are you using express, or another web framework? Was the memory leak just from the server running, or when it was receiving requests? |
@AbhiPrasad thank you for your quick response and your interest.
This server receives many requests, so it's difficult for me to answer that question. Most likely because of receiving requests.
Yes, I'll try a little later. It will take me a few days to do this. |
@xr0master you'll have to remove your domains implementation, you can just use Also the leak may be because of:
which actually you should remove regardless, since this does nothing for you even on |
The error handler is located in a different place since it is a built-in global handler in Fastify. But I may not fully understand it. In any case, I will take your advice and switch to a new implementation. Let's see. |
Hey @bagr001 could you share the Node version you are using, as well as the way you are initializing sentry? Are you using the implementation here: #4784 (comment)? |
@AbhiPrasad My Node version is 17.9.0 and using this plugin https://github.com/immobiliare/fastify-sentry |
Seems like this will be fixed with immobiliare/fastify-sentry#533! |
So, I will also confirm 7.47.0 is fine. I changed the implementation from the domain to the async context. The code runs for a few hours on the production server, and no problems have been noticed. P.S. It's up to you guys, but it may be better to increase the major version of the SDK next time. IMO |
Hey @xr0master apologies on that. We decided to ship this with a minor because we found no regressions when testing, but I guess we didn't look at the case where both domains and async local storage were used at the same time. We wanted to get this out of the door asap because of the massive performance benefits you get by using |
@AbhiPrasad You don't need to apologize. I definitely understand your motives. And I think not only me. |
Closing this for now since it seems it was just fastify having the issue, and domains were dropped with https://github.com/immobiliare/fastify-sentry/releases/tag/v6.0.0. Please re-open if anything else comes up. Thanks! |
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
7.48.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
Updated from version 7.44.2 to 7.48.0 and started getting a report on the server about the fully used memory. Tried twice. Then I returned to version 7.44.2 and the problem disappeared.
This is a production server, there is always a chance that the memory has been used by something else.
The node version is 16.20
Expected Result
no leak
Actual Result
leak
The text was updated successfully, but these errors were encountered: