Process freezing and eating CPU
Unanswered
Wuchang bream posted this in #help-forum
Wuchang breamOP
Hey, did anyone had this issue? I just saw 2 processes eating a lot of cpu and lagging the machine, I had this once some time ago too.
28 Replies
Wuchang breamOP
what info should i add?
American black bear
maybe what processes you are talking about, what are you trying to achieve, what are you using in your tech stack, what is a lot of cpu, etc.
Wuchang breamOP
i saw 2x 100% cpu/thread
whole dedicated server was lagging even after killing the processes
i run next.js with bun
maybe its caused by node redis
I have the same issue and haven’t found the reason tbh. Idk if this is a memory leak or what. I’ve used VS code and Cursor and both editors seems to have the same issue and only when running a Next.js dev server.
My RAM is at 95-99% often when I have my Next.js dev server running. It gets laggy and it freezes sometimes too.
My RAM is at 95-99% often when I have my Next.js dev server running. It gets laggy and it freezes sometimes too.
For the record, I have a Legion laptop, 16RAM ryzen 5 7000 series and I think this shouldn’t be an issue at all
Wuchang breamOP
now i got this error while being in the dev mode
<--- Last few GCs --->
[99647:0x55d8dd88a020] 7749953 ms: Scavenge 17821.9 (18127.0) -> 17819.2 (18131.7) MB, 26.0 / 0.0 ms (average mu = 0.984, current mu = 0.971) task;
[99647:0x55d8dd88a020] 7750003 ms: Scavenge 17826.3 (18131.7) -> 17823.7 (18136.7) MB, 25.3 / 0.0 ms (average mu = 0.984, current mu = 0.971) task;
[99647:0x55d8dd88a020] 7750064 ms: Scavenge 17831.6 (18136.7) -> 17829.0 (18140.2) MB, 28.7 / 0.0 ms (average mu = 0.984, current mu = 0.971) task;
<--- JS stacktrace --->
FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory
1: 0x7fae2b416cb8 node::Abort() [/lib/x86_64-linux-gnu/libnode.so.108]
2: 0x7fae2b30806e [/lib/x86_64-linux-gnu/libnode.so.108]
3: 0x7fae2b7e0e20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.108]
4: 0x7fae2b7e11dc v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.108]
5: 0x7fae2b9b33f5 [/lib/x86_64-linux-gnu/libnode.so.108]
6: 0x7fae2ba18185 [/lib/x86_64-linux-gnu/libnode.so.108]
7: 0x7fae2ba181e0 v8::internal::MarkCompactCollector::CollectGarbage() [/lib/x86_64-linux-gnu/libnode.so.108]
8: 0x7fae2b9c5021 v8::internal::Heap::MarkCompact() [/lib/x86_64-linux-gnu/libnode.so.108]
9: 0x7fae2b9c5788 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.108]
10: 0x7fae2b9c667d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/lib/x86_64-linux-gnu/libnode.so.108]
11: 0x7fae2b9a4c3a v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.108]
12: 0x7fae2b9a5825 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.108]
13: 0x7fae2b98687e v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/lib/x86_64-linux-gnu/libnode.so.108]
14: 0x7fae2bd5a812 v8::internal::Runtime_AllocateInOldGeneration(int, unsigned long*, v8::internal::Isolate*) [/lib/x86_64-linux-gnu/libnode.so.108]
15: 0x7fae2b6f1e79 [/lib/x86_64-linux-gnu/libnode.so.108]
earlier i had
thread 'tokio-runtime-worker' panicked at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/serde_json-1.0.138/src/ser.rs:2083:64:
byte index 1 is not a char boundary; it is inside '\0' (bytes 0..1) of `��4�2772e4958aaa0b438e4018bc3034ed546d`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@LuisLl I have the same issue and haven’t found the reason tbh. Idk if this is a memory leak or what. I’ve used VS code and Cursor and both editors seems to have the same issue and only when running a Next.js dev server.
My RAM is at 95-99% often when I have my Next.js dev server running. It gets laggy and it freezes sometimes too.
Wuchang breamOP
but we are talking about when normal app that was built is running, yes?
I was talking about having the dev server running:
I haven’t faced this issues with the production build
npm run dev
I haven’t faced this issues with the production build
Wuchang breamOP
right, the main lag thing happened for me with the build and these 2 errors with the dev
performance issues are really common on windows
@Anay-208 | Ping in replies performance issues are really common on windows
Wuchang breamOP
i have these on linux
@Anay-208 | Ping in replies Specs?
Wuchang breamOP
good
its a huge server
@Wuchang bream its a huge server
Server?
Are you talking about in prod?
Are you talking about in prod?
@Anay-208 | Ping in replies Server?
Are you talking about in prod?
Wuchang breamOP
yea i test and run on the same dedicated server
it lagged whole one, cpu 2 threads for 100% and it was still lagging when processes were killed
@Wuchang bream yea i test and run on the same dedicated server
On 2 GB ram it works fine for me
@Anay-208 | Ping in replies On 2 GB ram it works fine for me
Wuchang breamOP
it can work fine, but i had these errors too
today it can be fine tomorrow you can have whole lagged server
@Wuchang bream today it can be fine tomorrow you can have whole lagged server
Oh really? If I’m right, you just transfer build and run pnpm start
Do you’ve any other services running on the VM
@Anay-208 | Ping in replies Oh really? If I’m right, you just transfer build and run pnpm start
Wuchang breamOP
with bun but yes
@Anay-208 | Ping in replies Do you’ve any other services running on the VM
Wuchang breamOP
i dont use vm there thats the reason it lagged whole server and other services