Next.js Discord

Discord Forum

How debug Next JS on runtime (production) ?

Unanswered
Long-legged ant posted this in #help-forum
Open in Discord
Long-legged antOP
On a certains page, the memory is increasing each hour and the RAM goes up for 2Go on the server, how can i debug this ? Thank you.

7 Replies

@Long-legged ant On a certains page, the memory is increasing each hour and the RAM goes up for 2Go on the server, how can i debug this ? Thank you.
i heard next/image has (or had) a memory leak, do you use next/image on that page? if yes, try using normal <img> instead, does it fix the problem?
Long-legged antOP
No, the never use next/image, i use basic <img/> because the images are already optimised from the API. It's a very strange behavior, i don't know if it come from the node js version, the next js version or the project code... It's why i need a tool for debugging this issue, i don't know if you know somes ?
Long-legged antOP
It's basically a memory leak.
American Chinchilla
Have you tried dev tools?
They have options to snapshot and check memory usage…
@Long-legged ant No, the never use next/image, i use basic <img/> because the images are already optimised from the API. It's a very strange behavior, i don't know if it come from the node js version, the next js version or the project code... It's why i need a tool for debugging this issue, i don't know if you know somes ?
unfortunately i don't know any such tools, what i would do is to check for parts that may lead to high server-side load (e.g. dynamic data fetching, complex server components, etc.), try removing them (on staging, not on prod, of course) and see if the server load becomes better
@American Chinchilla Have you tried dev tools?
Long-legged antOP
Hello, no i didn't try, i didn't even know we can see the server RAM consumption on devtools. Thank you.