Memory leaks since 3.9.0 version.
On January 3rd we updated Nuxt to 3.9.0 version and since then were suffering from massive memory leaks.
Does anybody have any idea what may have caused this?
I've tried pretty much everything what could've been done, researched all 3rd party packages for known memory issues, updated everything to newest versions, refactored our own code, but nothing helps.
If anybody has any pointers to grab onto, help will be very much appreciated.
10 Replies
Update:
Memory leak was caused by sentry by creating an instance on server side.
www.lichter.io
Integrate Sentry with your Nuxt 3 application - A Recipe
Sentry is a great tool to track errors and performance issues in your application - but the Nuxt module is not Nuxt 3 compatible yet. In this article, I'll show you how to integrate Sentry into your Nuxt 3 application, even before the module is ready and also share why it takes longer than you might think to build the module.
@Denis Jankelaic sorry for the ping, but we're having this issue too after adding Sentry. How did u fix this?
Hello, Sentry should be strictly client sided. Create
sentry.client.ts
sentry config file in plugins
folder, and add it to nuxt.config
as below:
Thanks for this!
I am experiencing memory leak issue with a SSR nuxt managed by 4 workers through PM2 so it was 4x700mb memory usage for an app used by 20 users...
Can't tell for now if this will fix the issue but sentry was executed on both server & client side.
Curious if that fixed your issue?
I ran a front-end update few minutes ago so the pm2 processes restarted.
Generally I hit 700mb memory usage per process within the day.
Here is the screenshot for now, I'll ping you in few hours to see how the memory usage goes
@Denis Jankelaic more than 24 hours later, the memory usage is still ok.
@Denis Jankelaic Sentry can also be for the server