tools icon indicating copy to clipboard operation
tools copied to clipboard

JS Heap Allocation Error on

Open itskelechi opened this issue 4 months ago • 0 comments

Getting a persistent JS heap allocation message on a ejs application running mssql queries. It looks similar to the other issues reported but the codes are diffrent so are the environments

Full error message:

<--- Last few GCs --->

[620:00000169C25C6000] 33390 ms: Scavenge (interleaved) 4032.9 (4049.9) -> 4032.4 (4061.4) MB, pooled: 0 MB, 37.05 / 0.00 ms (average mu = 0.176, current mu = 0.136) allocation failure; [620:00000169C25C6000] 37026 ms: Mark-Compact (reduce) 4032.7 (4061.4) -> 4032.7 (4035.2) MB, pooled: 0 MB, 3456.91 / 0.00 ms (+ 5.1 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 3466 ms) (average mu = 0.14

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace -----

1: 00007FF6EAB3690D node::SetCppgcReference+16781 2: 00007FF6EAA9A218 v8::base::CPU::num_virtual_address_bits+98760 3: 00007FF6EB797B51 v8::Isolate::ReportExternalAllocationLimitReached+65 4: 00007FF6EB784406 v8::Function::Experimental_IsNopFunction+2694 5: 00007FF6EB5C0020 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+33824 6: 00007FF6EB5B93A4 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+6052 7: 00007FF6EB5B50BD v8::Platform::SystemClockTimeMillis+648333 8: 00007FF6EADD71FD BIO_ssl_shutdown+189 9: 00007FF6EB5BCC16 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+20502 10: 00007FF6EB6213EE v8::Locker::IsLocked+7246 11: 00007FF6EB297E94 v8::base::AddressSpaceReservation::AddressSpaceReservation+333940 12: 00007FF68B83027A

Environment:

Windows 11 v 24H2 VSCode (recently updated) mssql: ^11.0.1 express: ^4.21.2 nodemon: ^3.1.10


I've tried increasing the allocated memory space both on the system end and the application end but that failed, and refactoring the code didn't help, the bug happened very suddenly.

itskelechi avatar Aug 25 '25 17:08 itskelechi