##[error]ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory

This was originating from Azure DevOps pipilene while running an analysis with SonarQube. tried to apply below steps but no luck.

NPM Task

“npm install -g increase-memory-limit”

Pipeline Variable

SONAR_SCANNER_OPTS = -Xmx4096m

Error Log

INFO: Sensor TypeScript analysis [javascript] INFO: Using TypeScript at: ‘D:\a\45\s\Source\RockyBrands.MODocuments\Presentation Tier\RockyBrands.MODocuments.Web.UI\node_modules’ INFO: Found 2 tsconfig.json file(s): [D:\a\45\s\Source\RockyBrands.MODocuments\Presentation Tier\RockyBrands.MODocuments.Web.UI\obj\Dev\Package\PackageTmp\tsconfig.json, D:\a\45\s\Source\RockyBrands.MODocuments\Presentation Tier\RockyBrands.MODocuments.Web.UI\tsconfig.json] INFO: 23 source files to be analyzed INFO: Analyzing 23 files using tsconfig: D:\a\45\s\Source\RockyBrands.MODocuments\Presentation Tier\RockyBrands.MODocuments.Web.UI\tsconfig.json INFO: 0/23 files analyzed, current file: Source/RockyBrands.MODocuments/Presentation Tier/RockyBrands.MODocuments.Web.UI/app/Home/Payments/batch-details/batch.details.component.ts INFO: 0/23 files analyzed, current file: Source/RockyBrands.MODocuments/Presentation Tier/RockyBrands.MODocuments.Web.UI/app/Home/Payments/batch-details/batch.details.component.ts INFO: 0/23 files analyzed, current file: Source/RockyBrands.MODocuments/Presentation Tier/RockyBrands.MODocuments.Web.UI/app/Home/Payments/batch-details/batch.details.component.ts INFO: 0/23 files analyzed, current file: Source/RockyBrands.MODocuments/Presentation Tier/RockyBrands.MODocuments.Web.UI/app/Home/Payments/batch-details/batch.details.component.ts INFO: 0/23 files analyzed, current file: Source/RockyBrands.MODocuments/Presentation Tier/RockyBrands.MODocuments.Web.UI/app/Home/Payments/batch-details/batch.details.component.ts ##[error]ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096). ERROR: eslint-bridge Node.js process is unresponsive. This is most likely caused by process running out of memory. Consider setting sonar.javascript.node.maxspace to higher value (e.g. 4096). ##[error]ERROR: Failure during analysis, Node.js command to start eslint-bridge was: {NODE_PATH=D:\a\45\s\Source\RockyBrands.MODocuments\Presentation Tier\RockyBrands.MODocuments.Web.UI\node_modules} node D:\a\45.sonarqube\out.sonar.sonartmp\eslint-bridge-bundle\package\bin\server 49855 java.lang.IllegalStateException: eslint-bridge is unresponsive at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.request(EslintBridgeServerImpl.java:202) at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.analyzeTypeScript(EslintBridgeServerImpl.java:186)

Hi Dilanka Peiris,

Facing a similar issue, did you found the fix for this issue.

Hello Dilanka
I see that you posted your issue on this older thread as well. Did you apply the recommendations shared there?
There are three of them:

  1. Set the sonar.javascript.node.maxspace analysis parameter for your scanner to increase the memory heap size for the node.js execution, as recommended in SonarQube documentation
  2. Use SonarQube 8.5 as it brings an improved analyzer for JS/TS
  3. Make sure your AzDO build agent has sufficient memory for both the scanner JVM and the Node.js heaps (e.g. if 4g and 4g make sure the agent has more than 8GB memory).

Let me know.
Best,
Sylvain

1 Like

We get this too. I was waiting to upgrade to 8.5.1 before reporting - we’ve upgraded and still getting the issues. The machine has 16gb of ram and the max heap is set at 8gb. We have a few thousand typescript files and I notice it times out after a minute. Could it be that it needs more time? is there any logs we can get from the typescript eslint bridge?

Could it be because we use a later version of typescript than is officially supported?

Not yet. Upgraded to Version 8.5. But still the issue is there

Hello everyone,

SonarQube 8.5 and higher packages its own TypeScript 3.8.3 version, so whatever version you use in package.json does not matter.

For now, please follow Sylvain’s suggestions first. If those don’t work, then continue here:

  1. Make sure to use Sonar scanner 4.5, the latest version, which you can download here.
  2. If you set 4096 or 8192 for sonar.javascript.node.maxspace, then try 12288 or 16384 if you have enough RAM/heap to handle it.
  3. Modify your tsconfig.json by adding “include” and “exclude” properties and adjusting scope of files accordingly. This can help reduce the load of analysis on the Sonar scanner. This may mimic your settings for “sonar.sources”, “sonar.exclusions”, or “sonar.inclusions” on your project.
  4. If you are on Windows machine, the deployment of bundle (e.g. 16:46:36.437 DEBUG: Deploying bundle (done) | time=44355ms) is likely slow because antivirus (like Windows defender) is checking every file in the bundle, which makes it very slow. On Linux we can extract bundle much faster. You can configure exception for your antivirus to not check scanner folders .scannerwork , which will help to reduce time with every analysis.

Joe

1 Like

3 posts were split to a new topic: Eslint-bridge is unresponsive when analyzing JS project

Encounter the same issue.

Here is my env:

  • SonarQube Community Edition Version 10.1 (build 73491)
  • SonarScanner 4.8.0.2856
  • Java 11.0.19 Eclipse Adoptium (64-bit)
  • Linux 5.15.0-76-generic amd64