Recently I was working on a NextJs project and my mac suddenly gets blank, it get locked. After some findings I checked the processes on activity monitor, there I found one process which was consuming 1.9GB of memory space which made the mac to lock the screen.
My project has some routes in that ( like home, library, about ) so that I created a new NextJs project and ran that preloaded template and checked the activity monitor once again and what there was same next-router-worker which has taken a quit big memory space ( 2.02GB ).
Why is this happening or have I made some errors ?
If anybody knows Please help, this is what next-router-worker process looks like
NextJs version - v13 device - M1 Macbook
I have also noticed the memory leak issue with the next-worker-router
. In my case, it spiked around upto 2-3 GB before running out of RAM. There has been a fix to this issue with version 13.4.13-canary.12
.
It was caused by exits not cleaning up properly by router-server
I suggest you to upgrade to the latest Next version 14 or if you're too strict on making the change, to upgrade to v13.4.13-canary.12
or above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With