-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.6.1
-
Component/s: CLI Module
-
None
-
1
-
Not Needed
-
Iteration Porpoise
Reported in https://mongodb.slack.com/archives/CUHC9R8J0/p1669893135423849
Shell API calls lead to an event being emitted on the mongosh bus, which currently is a `nanobus` instance, which defaults to emitting a performance entry through the Node.js version of the web’s performance API.
These performance entries are never garbage collected, making the process fail with an OOM crash. E.g.:
$ env NODE_OPTIONS=--max-old-space-size=96 mongosh --quiet --eval "i = 0; while (1) { i++; if (i % 10000 === 0) print(i); config.get(''); }"
10000
20000
30000
40000
50000
60000
<--- Last few GCs --->
Note that this does not reproduce if DISABLE_NANOTIMING=1 is set on the environment.