<p dir="auto">I have developed a desktop app with electron.<br>
I have put setLoginItemSettings on  windows  startup windows , my app should start at start on windows. Some of my functionality is not working properly(Only login is working).</p>
<h3 dir="auto">Preflight Checklist</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/main/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li>
</ul>
<h3 dir="auto">Electron Version</h3>
<p dir="auto">14/15+</p>
<h3 dir="auto">What operating system are you using?</h3>
<p dir="auto">Other (specify below)</p>
<h3 dir="auto">Operating System Version</h3>
<p dir="auto">observed on latest Windows 10 &amp; macOS 11</p>
<h3 dir="auto">What arch are you using?</h3>
<p dir="auto">x64</p>
<h3 dir="auto">Last Known Working Electron version</h3>
<p dir="auto">13.5.1</p>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Electron processes should not have a hard memory limit of ~8GB, but this limit was introduced with Electron 14.</p>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">With Electron ≥14, loading operations fail (or process crashes with <code class="notranslate">oom</code>) when attempting to load data into RAM if memory use exceeds ~8GB. This limit did not exist (or was significantly higher) in versions 13 and earlier.</p>
<h3 dir="auto">Testcase Gist URL</h3>
<p dir="auto"><a href="https://github.com/marcelblum/electron-memory-tests">https://github.com/marcelblum/electron-memory-tests</a></p>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">Simple demo to reproduce:</p>
<ol dir="auto">
<li>clone repo at <a href="https://github.com/marcelblum/electron-memory-tests">https://github.com/marcelblum/electron-memory-tests</a></li>
<li><code class="notranslate">npm install</code> will install both latest electron and electron 13.5.1</li>
<li><code class="notranslate">npm run start-electron-13</code></li>
<li>repeatedly click the "fill renderer process RAM with 2GB" and/or "fill main process RAM with 2GB" buttons. For demo purposes this just creates a quick dummy buffer with <code class="notranslate">Buffer.alloc()</code>. In my tests in Electron 13 on several Windows &amp; Mac machines with installed RAM varying from 8-16GB, I can do this with each process going up to at least 16GB until errors start to occur.</li>
<li><code class="notranslate">npm run start-electron-latest</code> and repeat as above. In Electron 14/15/16/17 there is a clear hard limit at around 8GB per-process when loading starts to fail.</li>
</ol>
<p dir="auto">I have tried experimenting with <code class="notranslate">max_old_space_size</code> e.g. <code class="notranslate">app.commandLine.appendSwitch('js-flags', '--max_old_space_size=16384')</code> or <code class="notranslate">require('v8').setFlagsFromString('--max-old-space-size=16384')</code> with no effect observed.</p>
<p dir="auto">It may be an edge case to need this much memory but it's not too difficult to run up against this new limit when loading lots of high res media files. In my own app using the web audio api, I noticed this limit pretty quickly after updating from Electron 13.</p>
<p dir="auto">Is this an intentional newly introduced limit? Is there any way to increase this limit? I assume this is not a Chromium issue since the limit also applies to the main process.</p>
<p dir="auto"><strong>Update</strong>: Looks like Electron 11 and earlier had no memory limits, but starting with Electron 12, a ~16GB limit was imposed, and then with Electron 14 that became a ~8GB limit. I've added Electron 11.5 to my demo for comparison via <code class="notranslate">npm run start-electron-11</code>.</p>