Currently I want to send thousands of api simultaneously using webworker.
However, if 250 workers are created at the same time, out of memory occurs as shown in the following screen.

First, we could temporarily solve this by stopping for 6 seconds when 200 workers were created like this.
const userConfirm = async function () {
let instanceArr = []
for (let i = 0; i < userArrivalRate; i++ ) {
if (i !== 0 && i % 200 === 0) {
await sleep(6000);
}
instanceArr[i] = new WorkerBuilder(myWorker);
instanceArr[i].postMessage({
duration : 2,
url: '',
method: "POST",
body: {
email: "test@test.com",
password: "test"
}
})
}
}
But I don't think it's fundamental.
I know that the default vm size of chromium is about 300MB. So I think it can be solved by increasing the v8 vm size with JavaScript.
Is there any way to adjust chromiun v8 memory size with javascript?
I'm curious if it's not the above problem or what part is the problem.