Template for a good new topic, formatted with Markdown:
- ALM used: Bitbucket Cloud
- CI system used: Bitbucket Cloud
- Scanner command used when applicable (private details masked)
- Languages of the repository: typscript
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space
INFO: 135/771 files analyzed, current file: /opt/atlassian/pipelines/agent/build/src/components/Layout/Main.js
time="2023-10-12T13:28:26Z" level=error msg="error waiting for container: unexpected EOF"
- Steps to reproduce
Huge repository, a lot of codes.
CI content:
definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &sonarqube
name: SonarQube
caches:
- sonar
runs-on:
- self.hosted
- linux
script:
- pipe: sonarsource/sonarcloud-scan:2.0.0
size: 2x
variables:
SONAR_SCANNER_OPTS: '-Xmx3062m'
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
My mahcine has 16 GB of RAM and i can use all of that. I’ve tried different options like memmory for docker service but still sometimes it failes.
- Potential workaround
Nothing.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!