I don’t think the issue is specifically related to pythonbugs. I don’t think the scanner is using the docker’s RAM.
I am not an expert in bitbucket, but looking at the documentation you sent, the 16GB of the size x4 is split between the docker container (15GB) and the build container (1GB).
But as the scanner is executer on the build container (as its not a docker command) the allocated RAM far exceed the available one.
I suggest you slightly lower the ran of the docker service to 13GB and allocate 2GB to the scanner engine instead of 11GB.
06:55:31.108 INFO Project configuration:
06:55:31.109 INFO Excluded sources: /node_modules/, /dist/, /coverage/, **/.min.js, **/.config.js, **/.config.ts, **/index.html, /public/, **/.json, **/.css, **/.scss, **/.svg, **/.png, **/.jpg, **/.ico, **/.woff, **/.woff2, **/.ttf, **/.eot, **/build-wrapper-dump.json
06:55:31.109 INFO Excluded tests: **/.test.ts, **/.test.tsx, **/.spec.ts, **/.spec.tsx
06:55:31.118 INFO 5 files indexed (done) | time=10ms
06:55:31.130 INFO Quality profile for ts: Sonar way
06:55:31.131 INFO ------------- Run sensors on module $SONAR_PROJECT_KEY
06:55:31.195 INFO Load metrics repository
06:55:31.334 INFO Load metrics repository (done) | time=140ms
06:55:31.347 INFO Sensor cache enabled
06:55:31.356 INFO Load sensor cache
06:55:31.703 INFO Load sensor cache (404) | time=347ms
06:55:32.902 INFO Sensor JasminFileCollectorSensor [jasmin]
06:55:32.905 INFO Sensor JasminFileCollectorSensor [jasmin] (done) | time=3ms
06:55:32.907 INFO Sensor IaC hadolint report Sensor [iac]
06:55:32.911 INFO Sensor IaC hadolint report Sensor [iac] (done) | time=4ms
06:55:32.912 INFO Sensor Java Config Sensor [iac]
06:55:32.925 INFO There are no files to be analyzed for the Java language
06:55:32.927 INFO Sensor Java Config Sensor [iac] (done) | time=14ms
06:55:32.928 INFO Sensor IaC Docker Sensor [iac]
06:55:32.929 INFO Sensor IaC Docker Sensor is restricted to changed files only
06:55:32.963 INFO There are no files to be analyzed for the Docker language
06:55:32.964 INFO Sensor IaC Docker Sensor [iac] (done) | time=35ms
06:55:32.965 INFO Sensor IaC GitHub Actions Sensor [iac]
06:55:32.967 INFO There are no files to be analyzed for the GitHub Actions language
06:55:32.968 INFO Sensor IaC GitHub Actions Sensor [iac] (done) | time=3ms
06:55:32.970 INFO Sensor IaC Shell Sensor [iac]
06:55:32.971 INFO There are no files to be analyzed for the Shell language
06:55:32.972 INFO Sensor IaC Shell Sensor [iac] (done) | time=2ms
06:55:32.974 INFO Sensor JavaScript/TypeScript analysis [javascript]
06:55:33.478 INFO Detected os: Linux arch: amd64 alpine: false. Platform: LINUX_X64
06:55:33.480 INFO Deploy location /opt/sonar-scanner/.sonar/js/node-runtime, tagetRuntime: /opt/sonar-scanner/.sonar/js/node-runtime/node, version: /opt/sonar-scanner/.sonar/js/node-runtime/version.txt
06:55:37.538 INFO Configured Node.js --max-old-space-size=2048.
06:55:37.539 INFO Using embedded Node.js runtime.
06:55:37.539 INFO Using Node.js executable: ‘/opt/sonar-scanner/.sonar/js/node-runtime/node’.
time=“2026-02-08T06:57:13Z” level=error msg=“error waiting for container: unexpected EOF”