JavaScript heap out of memory during project analisys

Hello experts,

Please forgive my ignorance with this, I am still very new to the world of SonarQube

While trying to analyse a a project I am getting numerous errors around “JavaScript heap out of memory” we have increased the heap memory on the server but it has not rectified the issue.

Here are all the error lines reported during the analysis stage

	Line 112: 2022-09-20T07:27:50.0400208Z ##[error]ERROR: Browserslist: caniuse-lite is outdated. Please run:
	Line 112: 2022-09-20T07:27:50.0400208Z ##[error]ERROR: Browserslist: caniuse-lite is outdated. Please run:
	Line 113: 2022-09-20T07:27:50.0429586Z ERROR: Browserslist: caniuse-lite is outdated. Please run:
	Line 114: 2022-09-20T07:27:50.0431112Z ##[error]ERROR:   npx browserslist@latest --update-db
	Line 114: 2022-09-20T07:27:50.0431112Z ##[error]ERROR:   npx browserslist@latest --update-db
	Line 115: ERROR:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
	Line 116: 2022-09-20T07:27:50.0434742Z ERROR:   npx browserslist@latest --update-db
	Line 117: 2022-09-20T07:27:50.0435207Z ERROR:   Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
	Line 127: 2022-09-20T07:28:30.1527557Z ##[error]ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
	Line 127: 2022-09-20T07:28:30.1527557Z ##[error]ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
	Line 127: 2022-09-20T07:28:30.1527557Z ##[error]ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
	Line 128: 2022-09-20T07:28:30.1530571Z ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
	Line 128: 2022-09-20T07:28:30.1530571Z ERROR: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
	Line 129: 2022-09-20T07:28:30.4600093Z ##[error]ERROR:  1: 00007FF64505888A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
	Line 129: 2022-09-20T07:28:30.4600093Z ##[error]ERROR:  1: 00007FF64505888A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
	Line 130: ERROR:  2: 00007FF6450333C6 node::MakeCallback+4534
	Line 131: 2022-09-20T07:28:30.4602517Z ERROR:  1: 00007FF64505888A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
	Line 132: 2022-09-20T07:28:30.4603349Z ERROR:  2: 00007FF6450333C6 node::MakeCallback+4534
	Line 133: 2022-09-20T07:28:30.4606589Z ##[error]ERROR:  3: 00007FF645033D40 node_module_register+2032
	Line 133: 2022-09-20T07:28:30.4606589Z ##[error]ERROR:  3: 00007FF645033D40 node_module_register+2032
	Line 134: ERROR:  4: 00007FF645351EAE v8::internal::FatalProcessOutOfMemory+846
	Line 135: ERROR:  5: 00007FF645351DDF v8::internal::FatalProcessOutOfMemory+639
	Line 136: ERROR:  6: 00007FF6455385D4 v8::internal::Heap::MaxHeapGrowingFactor+9620
	Line 137: ERROR:  7: 00007FF64552F5B6 v8::internal::ScavengeJob::operator=+24550
	Line 138: 2022-09-20T07:28:30.4608138Z ERROR:  3: 00007FF645033D40 node_module_register+2032
	Line 139: 2022-09-20T07:28:30.4608537Z ERROR:  4: 00007FF645351EAE v8::internal::FatalProcessOutOfMemory+846
	Line 140: 2022-09-20T07:28:30.4608995Z ERROR:  5: 00007FF645351DDF v8::internal::FatalProcessOutOfMemory+639
	Line 141: 2022-09-20T07:28:30.4609454Z ERROR:  6: 00007FF6455385D4 v8::internal::Heap::MaxHeapGrowingFactor+9620
	Line 142: 2022-09-20T07:28:30.4609899Z ERROR:  7: 00007FF64552F5B6 v8::internal::ScavengeJob::operator=+24550
	Line 143: 2022-09-20T07:28:30.4611090Z ##[error]ERROR:  8: 00007FF64552DC0C v8::internal::ScavengeJob::operator=+17980
	Line 143: 2022-09-20T07:28:30.4611090Z ##[error]ERROR:  8: 00007FF64552DC0C v8::internal::ScavengeJob::operator=+17980
	Line 144: ERROR:  9: 00007FF645536957 v8::internal::Heap::MaxHeapGrowingFactor+2327
	Line 145: 2022-09-20T07:28:30.4612168Z ERROR:  8: 00007FF64552DC0C v8::internal::ScavengeJob::operator=+17980
	Line 146: 2022-09-20T07:28:30.4612621Z ERROR:  9: 00007FF645536957 v8::internal::Heap::MaxHeapGrowingFactor+2327
	Line 147: 2022-09-20T07:28:30.4613715Z ##[error]ERROR: 10: 00007FF6455369D6 v8::internal::Heap::MaxHeapGrowingFactor+2454
	Line 147: 2022-09-20T07:28:30.4613715Z ##[error]ERROR: 10: 00007FF6455369D6 v8::internal::Heap::MaxHeapGrowingFactor+2454
	Line 148: 2022-09-20T07:28:30.4614714Z ERROR: 10: 00007FF6455369D6 v8::internal::Heap::MaxHeapGrowingFactor+2454
	Line 149: 2022-09-20T07:28:30.4615628Z ##[error]ERROR: 11: 00007FF645660C77 v8::internal::Factory::NewFillerObject+55
	Line 149: 2022-09-20T07:28:30.4615628Z ##[error]ERROR: 11: 00007FF645660C77 v8::internal::Factory::NewFillerObject+55
	Line 150: 2022-09-20T07:28:30.4616487Z ERROR: 11: 00007FF645660C77 v8::internal::Factory::NewFillerObject+55
	Line 151: 2022-09-20T07:28:30.4617429Z ##[error]ERROR: 12: 00007FF6456DDE66 v8::internal::operator<<+73494
	Line 151: 2022-09-20T07:28:30.4617429Z ##[error]ERROR: 12: 00007FF6456DDE66 v8::internal::operator<<+73494
	Line 152: ERROR: 13: 000002F6F31DC6C1
	Line 153: 2022-09-20T07:28:30.4618222Z ERROR: 12: 00007FF6456DDE66 v8::internal::operator<<+73494
	Line 154: 2022-09-20T07:28:30.4618569Z ERROR: 13: 000002F6F31DC6C1 
	Line 155: 2022-09-20T07:28:30.4820421Z ##[error]ERROR: Failed to get response while analyzing ClientApp/projects/lib/rtpm-common-desktop/src/lib/components/reg-correspondence/correspondence-landing/correspondence-landing.component.ts
	Line 155: 2022-09-20T07:28:30.4820421Z ##[error]ERROR: Failed to get response while analyzing ClientApp/projects/lib/rtpm-common-desktop/src/lib/components/reg-correspondence/correspondence-landing/correspondence-landing.component.ts
	Line 223: 2022-09-20T07:28:30.4843271Z ERROR: Failed to get response while analyzing ClientApp/projects/lib/rtpm-common-desktop/src/lib/components/reg-correspondence/correspondence-landing/correspondence-landing.component.ts
	Line 292: 2022-09-20T07:28:30.4939169Z ##[error]ERROR: Failure during analysis, Node.js command to start eslint-bridge was: C:\hostedtoolcache\windows\node\10.23.0\x64\node.exe D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\bin\server 56301 127.0.0.1 D:\a\1\s\.scannerwork true false D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\custom-rules6806954594325282594\package
	Line 292: 2022-09-20T07:28:30.4939169Z ##[error]ERROR: Failure during analysis, Node.js command to start eslint-bridge was: C:\hostedtoolcache\windows\node\10.23.0\x64\node.exe D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\bin\server 56301 127.0.0.1 D:\a\1\s\.scannerwork true false D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\custom-rules6806954594325282594\package
	Line 360: 2022-09-20T07:28:30.5028284Z ERROR: Failure during analysis, Node.js command to start eslint-bridge was: C:\hostedtoolcache\windows\node\10.23.0\x64\node.exe D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\bin\server 56301 127.0.0.1 D:\a\1\s\.scannerwork true false D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\custom-rules6806954594325282594\package

Any help on this matter would be gratefully received. I am not entirely sure I have provided enough information for anyone to assist, so please forgive me on that account.

Of particular interest is the following line, which seems excessive in the terms or memory usage, do we simply increase the memory to accommodate this figure ?
Line 141: 2022-09-20T07:28:30.4609454Z ERROR: 6: 00007FF6455385D4 v8::internal::Heap::MaxHeapGrowingFactor+9620

Many thanks in advance and any help in this matter will be highly appreciated

Hey there.

There’s some requested information in the topic template missing, such as:

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

It would also be useful to know what environment you’re running analysis in – locally on your own machine? Using a build pipeline hosted somewhere (GitHub, Bitbucket)?

Hi There, sorry for the delayed response ( public holidays and such )

Sorry I missed the “Must-share information” which I can’t seem to find now either. I will endeavor to get you the information as soon as I can.

The error log was from a pipeline build hosted in Azure. Configured as a “standalone scanner” for "other ( for JS, TS, Go Python,PHP) " I believe the version is just SonarQube, but I will do my best to find that out for certain.

Again please accept my apologies, this is a realm I have had no previous experience in.

Many thanks again for your assistance so far

You can find the version details in the footer of your SonarQube instance.

Thank you

Developer Edition - Version 9.2.3 (build 50713 )

Many thanks again

Thanks.

This kind of problem we can only troubleshoot on the LTS or Latest version of SonarQube (v9.6v9.2 has been EOL since v9.3 came out). Since then, we’ve made 12 significant updates to the Javascript part of our analysis engine.

I would suggest you ask your administrators about upgrading (if you are not the admin), and let us know if you still face the issue.