Multiple profiles, memory purge

Hello, i cant figure out a solution for this, maybe someone knows how? I am running multiple scripts using multiple browser profiles. I need to clean memory to avoid out of memory error, which happens after some hours, even thought scripts are kinda short and loops. I have 8gb ram (no clue why its happens, ram is not filling up).

Anyway i am trying to use batch files with call command, when scripts finishes after certain loop count, browser closes and the batch file launches it again. It is working, however only for 1 profile. I suspect this is because profiles run under same .exe. Is there any way around this out of memory error in multiple scripts case?

Are you restarting the browser?

Thats what i want to do for multiple profiles.

I do not use Chrome (too slow and require too ram) but with firefox you can free memory in easy way periodically.

Load url in firefox:


And click 3 buttons to free memory, this reduce memory and free all memory, sometimes i reduced memory usage of 5GB with this command.

Warning: If you need to reduce a large amount of memory need to wait 1 minutes after clicked a button, after open task manager and you’ll see all ram free again.

See image

With batch files you can use taskkill /F /IM chrome.exe /T

In my automations I make sure that I close the browser ~every hour or so. That avoids all kinds of browser memory issues.