ChromeDriver 124 (Stable) leaving processes around and bogging CPU

381 views
Skip to first unread message

Jeff Vincent

unread,
May 8, 2024, 2:00:33 PMMay 8
to ChromeDriver Users
I'm noticing when I run some automation tests that when chromedriver.exe launches, I get 7 or so sub-processes of chrome.exe, but after I call driver.quit(), it only shuts down 5 of the chrome.exe processes and this happens every time I run chromedriver.exe and eventually if not caught, will bog down the CPU.  There are no visible Chrome windows/process from the desktop perspective.  In other words, it doesn't seem to be leaving any visible open windows.

Has anyone else seen this?  I've seen issues with beta versions using more CPU, but haven't seen any others right off being reported where sub-processes are left around.

Thanks.

lior...@gmail.com

unread,
May 8, 2024, 2:28:05 PMMay 8
to ChromeDriver Users
I see a similar issue in linux. For a long time I have an issue that driver. quit() does not free all the memory of the chrome subprocesses. I have Jenkins jobs that run automation that use chrome driver. After each test the RAM of the process is increasing. The driver.quit() does not release all the memory. And jobs are fail due to out of memory. I didn't find a solution to this problem. I take a big amount of RAM to run a job, and decrease the amount of tests that are running in the jobs. After the Jenkins job is finished, It looks that it release all the memory. 

Sander Lopes

unread,
May 8, 2024, 2:38:38 PMMay 8
to ChromeDriver Users
Yes, I have the exact same thing. With chrome driver 124.0.6367.91.
What I also noticed is that when using incognito chrome options. When downloading a file, you get a file explorer where you have to select a location for your downloaded file. 
I did not have this with previous chrome versions.

Op woensdag 8 mei 2024 om 20:28:05 UTC+2 schreef lior...@gmail.com:

Lee Read

unread,
May 13, 2024, 2:28:54 PMMay 13
to ChromeDriver Users

Hi Jeff,

I'm also seeing the symptoms you describe on Windows running chromedriver 124.0.6367.201.
I've not been able to figure out what is going on yet.
I also run tests on macOS and Linux and do not see this issue on those OSes.

If I learn more, I'll report back.

-Lee-

Jan Hansen

unread,
May 13, 2024, 3:04:19 PMMay 13
to ChromeDriver Users
Hi.

Try removing argument no-sandbox if used, 
and call driver.close and then driver.quit. Maybe with a second or two delay after each call.
This solved a similar problem for me on Windows.

/Jan

Lee Read

unread,
May 13, 2024, 3:34:00 PMMay 13
to ChromeDriver Users
Thanks so much, Jan, removing the --no-sandbox option worked!
I do not seem to need the delays (but also note I am not using Selenium).

-Lee-

usha Rani

unread,
May 21, 2024, 1:14:00 PMMay 21
to ChromeDriver Users
Could someone please give me workaround for the following?
I am on Chrome version 124+ and as suggested above, removed 'No-Sanbox' and added driver.close() and everything works fine in Windows. However we run scripts in Jenkins using linux platform where i can't remove 'No-sandbox'. Chrome Browser is opening with blank page. Please suggest how to fix the issue in linux

QVSource Test

unread,
Jun 4, 2024, 10:28:07 AMJun 4
to ChromeDriver Users
thanks - removing the no-sandbox option fixed this for me on Windows (Selenium 4.21.0, chromedriver 125.0.6422.141, Chrome Version 125.0.6422.142 (Official Build) (64-bit))

Herick Mota

unread,
Aug 12, 2024, 9:13:20 AMAug 12
to ChromeDriver Users
the flag --no-sandbox is required to run tests on linux machines, otherwise the tests will not even start. 

I've tried manually kill the chromedriver process with psutil and os.kill, but it also causes the sequencial tests to fail (Only the first scenario passes). 

Anyone else found a solution for the issue? 
Reply all
Reply to author
Forward
0 new messages