java.lang.IllegalStateException: The bridge server is unresponsive

Hi,

about two weeks ago my SonarCloud pipeline stopped working. I use the Azure DevOps extension for the analysis steps. My project consists of Typescript and Javascript code.

The error i get is:
java.lang.IllegalStateException: The bridge server is unresponsive. It might be because you don’t have enough memory, so please go see the troubleshooting section: JavaScript, TypeScript, CSS | SonarQube Server Documentation

I already tried all kinds of memory improvements. I increased the memory of my agent from 7GB to 18GB. I increaded node.maxspace to 4096 and 8192. I increased java memory to 2GB.
Nothing changed the error. i also got it down to 6 .spec files in my tests, that are quite small. If i excempt them from analysis it works again.
My Scanner command is:

          - task: SonarCloudPrepare@3
            inputs:
              SonarQube: 'sonarcloud'
              organization: .....
              scannerMode: 'CLI'
              configMode: 'manual'
              cliProjectKey: '.....'
              cliProjectName: '.....'
              cliSources: '.'
              extraProperties: |
                sonar.verbose=true
                sonar.sources=src, server
                sonar.inclusions=**/*.?s, **/*.?sx
                sonar.exclusions=**/*spec.?s, **/tests/**, **/test/**
                sonar.tests=.
                sonar.test.inclusions=**/*spec.?s, **/tests/**, **/test/**
                sonar.test.exclusions=**/*.html, 
                sonar.javascript.node.maxspace=4096
                sonar.sourceEncoding=UTF-8
                sonar.javascript.node.debugMemory=true

          - task: SonarCloudAnalyze@3
            inputs:
              jdkversion: 'JAVA_HOME'
            continueOnError: true
            displayName: 'Sonarcloud'
          - task: SonarCloudPublish@3
            continueOnError: true
            inputs:
              pollingTimeoutSec: '300'

Are there any more things i can do about it?
best regards,
Sebastian

Hi Sebastian,

Can you provide your full analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

Hi Ann,

thank you for the reply. I am a bit hesitant to provide the full log in public as our project is private. Is it possible to send it private or to strip it to the relevant components of the log (If so, which are the relevant components :))?

best regards,
Sebastian

Hi Sebastian,

Feel free to redact as necessary.

 
Ann

Hi Ann,

sorry for the late reply. Here is the redacted version of the logs. I hope everything needed is there.
sonar_log.txt (119.1 KB)

Hi,

Thanks for the log!

I’ve never seen a Major GC event in an analysis log, much less in the middle of analyzing a single file. Based on that and the fact that you’ve already tried increasing the Node maxspace, I’m going to flag this for the language team.

 
Ann

Hi,

has there been an update so far?

Hello @Sebastian1,

can you please provide this sonar property?

sonar.typescript.tsconfigPaths=src/tsconfig.json,server/tsconfig.json

Seems the analysis in picking the root tsconfig.json, which I’m guessing may be creating a TS program with all files in project. Passing the 2 tsconfigs on each subfolder may help reducing memory footprint by creating 2 different smaller programs.

Cheers,
Victor

Hi Victor, thank you for the help.
Strangely, it also works if i pass all three tsconfig.json as parameter. So first of, thank you for fixing the issue for me :slight_smile:
Is there any difference in the analysis behaviour (regarding found issues etc.) if i only pass two of the tsconfigs compared to all three?

Hi @Sebastian1,

If a file can be part of different TypeScript programs (defined by tsconfig.json files) that have different compilerOptions , then yes, there can be different results: for example, changes in strictness will affect the behaviour of some rules