2

Our team is using bitbucket pipelines to build and deploy our react app.

Right now, the yarn build step is failing do to a memory exceeded limit issue within bitbucket pipelines.

After logging the memory usage, I noticed that the terser-webpack-plugin was running jest worker threads that are taking up a large amount of memory right before the failure.

This failure is occurring in our build step, not our test step.

We aren't running these tests, and I'm using --forceExit in our test step to ensure those tests are not running passed step execution.

Does anyone know why this plugin would be running tests in the build script?

Is there a way to stop them from running?

Below are the memory usage logs

Memory usage in megabytes:
8191
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   2388   728 ?        Ss   13:33   0:00 /bin/sh -c exit $( (/usr/bin/mkfifo /opt/atlassian/pipelines/agent/tmp/build_result && /bin/cat /opt/atlassian/pipelines/agent/tmp/build_result) || /bin/echo 1)
root           7  0.0  0.0   2388    96 ?        S    13:33   0:00 /bin/sh -c exit $( (/usr/bin/mkfifo /opt/atlassian/pipelines/agent/tmp/build_result && /bin/cat /opt/atlassian/pipelines/agent/tmp/build_result) || /bin/echo 1)
root           8  0.0  0.0   2300   744 ?        S    13:33   0:00 /bin/cat /opt/atlassian/pipelines/agent/tmp/build_result
root          10  0.0  0.0   2388  1408 ?        Ss   13:34   0:00 /bin/sh /opt/atlassian/pipelines/agent/tmp/wrapperScript3495155942582447061.sh
root          42  0.0  0.0   2388   728 ?        S    13:35   0:00 /bin/sh /opt/atlassian/pipelines/agent/tmp/buildScript11364665287647037922.sh
root          43  0.0  0.0   3736  2928 ?        S    13:35   0:00 /bin/bash -i /opt/atlassian/pipelines/agent/tmp/bashScript12075457348243585276.sh
root          44  0.0  0.0   3736  2220 ?        S    13:35   0:00 /bin/bash -i /opt/atlassian/pipelines/agent/tmp/bashScript12075457348243585276.sh
root          45  0.4  0.0   3736  2360 ?        S    13:35   0:01 /bin/bash -i /opt/atlassian/pipelines/agent/tmp/bashScript12075457348243585276.sh
root         149  0.0  0.1 775412 54716 ?        Sl   13:35   0:00 node /opt/yarn-v1.22.19/bin/yarn.js build
root         178  0.0  0.0   2400   676 ?        S    13:35   0:00 /bin/sh -c node --max-old-space-size=4096 scripts/build.js
root         179 85.0 11.3 4457236 3684220 ?     Sl   13:35   5:05 /usr/local/bin/node --max-old-space-size=4096 scripts/build.js
root         274 44.9  4.0 1857172 1315684 ?     Sl   13:35   2:40 /usr/local/bin/node --max-old-space-size=2048 /opt/atlassian/pipelines/agent/build/node_modules/fork-ts-checker-webpack-plugin/lib/service.js
root        9856 16.8  0.8 798832 274212 ?       Sl   13:39   0:14 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9868 12.2  0.2 629752 92040 ?        Sl   13:39   0:10 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9887 11.3  0.5 712008 182288 ?       Sl   13:39   0:09 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9906 11.7  0.2 626048 89324 ?        Sl   13:39   0:10 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9921 52.0  4.9 2104068 1605920 ?     Rl   13:39   0:45 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9936 11.5  0.2 628400 93228 ?        Sl   13:39   0:10 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root        9955 23.2  2.1 1214696 695708 ?      Sl   13:39   0:20 /usr/local/bin/node --max-old-space-size=4096 /opt/atlassian/pipelines/agent/build/node_modules/terser-webpack-plugin/node_modules/jest-worker/build/workers/processChild.js
root       12683  0.0  0.0   2296   752 ?        S    13:41   0:00 sleep 0.1
root       12684  0.0  0.0   7640  2656 ?        R    13:41   0:00 ps -aux
Memory usage in megabytes:
Drew Gallagher
  • 442
  • 1
  • 12

0 Answers0