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

  • Versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarCloud
  • Error observed (wrap logs/code around triple quote ``` for proper formatting)
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: Failure during analysis, Node.js command to start eslint-bridge was: {NODE_PATH=D:\a\1\s\...\Scripts\node_modules} node --max-old-space-size=4096 D:\a\1\s\.scannerwork\.sonartmp\eslint-bridge-bundle\package\bin\server 50091
  • In case of SonarCloud:
    • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
      Azure DevOps
    • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI, Jenkins, other)
      Azure DevOps

We have TypeScript project which includes about 1300 .ts files. Sometimes analysis failes in the beginning with this error: ā€œeslint-bridge Node.js process is unresponsiveā€. We tried to set different values for sonar.javascript.node.maxspace but it didnā€™t help. We use Azure DevOps pipelines and Microsoft hosted agents, as I know there are 7Gb of RAM.
This issue is floating, sometimes it works.
Is there any way how to fix it?

Any reply on this?

Do you see any other errors in the logs?

Could you experiment by removing dependencies in node_modules? (expect typescript)

I donā€™t see any other errors in the log.
After keeping only TypeScript in node_modules the process become more stable. But the error didnā€™t gone away completely, sometimes it still fails.

hello @aleksei.gus,

this is difficult to investigate without access to the actual project. Would it be an option for you to share the source of analyzed project with us? If possible we can arrange it privately. Another option if you want to try would be to analyze the code locally using local instance of SonarQube instead of SonarCloud.

Hi @saberduck, our repo is private but if we can share the source code privately with you it will work for us. Please let me know how I can do it.

Hi @saberduck, are you able to help my colleague Aleksei to move forward on this matter which has been blocking us for long time already?

Thanks Freddy Bang

@saberduck @Lena, Iā€™ve shared our source code with Elena in private messages 3 weeks ago. Is there any progress on this issue? We need to fix it as soon as possible.

1 Like

About half of our scans fails today because of this issue :worried:

I have the same issue with project that reach 700+ ts files.
sonar scanner 4.3.0.2102. SonarQube server 8.2. Java 11.0.3 AdoptOpenJDK (64-bit)

But also searching for solution. In sonar-project.properties I have added

sonar.javascript.node.maxspace=8192

But this does not help.

Err header:

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: Failure during analysis, Node.js command to start eslint-bridge was: {NODE_PATH=C:\repos\****\****\node_modules\@angular-devkit\build-optimizer\node_modules} node --max-old-space-size=8192 C:\repos\****\****\.scannerwork\.sonartmp\eslint-bridge-bundle\package\bin\server 63172
java.lang.IllegalStateException: eslint-bridge is unresponsive

Hi Aleksei,

Did you got a fix for your issue? Facing the same issue, even when the maxnodespace is set to 8192, getting the error as below:

2020-10-27T03:21:16.0119235Z 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).
2020-10-27T03:21:16.0119235Z ERROR: Failure during analysis, Node.js command to start eslint-bridge was: {NODE_PATH=C:\TFS2017Agent3_work1\2\s\NWD\AdGo.Underwriting\node_modules@angular-devkit\build-optimizer\node_modules} node --max-old-space-size=8192 C:\TFS2017Agent3_work1\2\s\NWD\AdGo.Underwriting.scannerwork.sonartmp\eslint-bridge-bundle\package\bin\server 40498
2020-10-27T03:21:16.0119235Z java.lang.IllegalStateException: eslint-bridge is unresponsive
2020-10-27T03:21:16.0119235Z at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.request(EslintBridgeServerImpl.java:200)

hello @aleksei.gus, and others,

sorry for no response on this thread, we were caught up in other work. We released SonarQube 8.5 with new version of JavaScript analyzer, which should alleviate some of the issues. Can you try to analyze with this version and report any issues here?

facing same problemā€¦

@sonarsourcers :slight_smile: I am facing similar issue, I am using sonarcloud-scan 1.2.0 version and it says, INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties

INFO: Project root configuration file: NONE

INFO: Analyzing on SonarQube server 8.0.0

After that it finds the project on Sonar and proceeds and suddenly error-out at this stage
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: Failure during analysis, Node.js command to start eslint-bridge was: node /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/bin/server 39411 127.0.0.1 /opt/atlassian/pipelines/agent/build/.scannerwork true /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/10369754587211157401/package

java.lang.IllegalStateException: eslint-bridge is unresponsive

Referred you documentation, both 8.0 and 8.5

cloud scan tool 1.2.0 seems to refer to sonar 8.0.0 and says to update the sonar.javascript.node.maxspace (as per above error) but that is on sonar 8.5 as per Documentation and not present in 8.0 as per the documentation but still I tried looking into settings on Sonar but there is no such setting at allā€¦ there are bunch of others settings but nothing with ā€œsonar.javascript.node.maxspaceā€

Followed this, that is for 8.5 -> https://docs.sonarqube.org/latest/analysis/languages/javascript/

Just to be precise , this has nothing to do with node version, we are already using alpine-12 node, it always error out at that stage :frowning:

cc: @saberduck Tibor Blenessy

hello @Mukesh_RT2019,

if you use SonarCloud then you should use the builtin documentation https://sonarcloud.io/documentation, the SonarQube version printed in the logs is irrelevant (I made feedback to the SonarCloud team about this internally).

How much ram is allocated to the container? Can you try to allocate more physical memory to the container?

@saberduck : Sorry but it didnā€™t work

Definitely some eslint error was the reason on Sonar scan side, it is complaining same which makes no sense

How much physical memory is available to the container which is running the scan?

resolved it, by segregating the memory, but the same didnā€™t worked earlier, sonarscan pipeline error messages and info messages are a bit misleading

Since there are no other reactions, I would consider this fixed. Feel free to open a new topic if you are facing issue with JavaScript/TypeScript analysis.

Iā€™m facing the same issue on Azure DevOps pipeline while running an analysis with SonarQube. I 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)

Please help.
Thanks.