ChromeDriver slow after a few days during the instantiation of the browser/webdriver client

2,182 views
Skip to first unread message

Andrew Robinson

unread,
Nov 11, 2014, 11:50:44 AM11/11/14
to seleniu...@googlegroups.com
Looking to see if someone could help me determine the cause of our issue. We have a Jenkins slave running tests on Google Chrome on a Windows 7 box. The tests used to be very stable even over days of automated testing runs. About two weeks ago, the tests started becoming much more unstable. Our build times on this machine went from 1.5 hours to over 6 hours. Looking into the issue, the problem is that the ChromeDriver goes from starting an instance of Chrome instantly to taking almost a full minute. When this happens, the chrome window opens quickly, with "data:," in the location bar, but the jUnit code is frozen waiting for the driver to come back.

This is all that is in the log when this happens:
04:29:07.467 Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 35931
04:29:07.467 Only local connections are allowed.
04:29:50.327 09:35:11.427 INFO - Webdriver client started

Note the time stamps. It took ~43 seconds from when ChromeDriver was created to when the client was ready. The slave is idle when this happens, plenty of RAM (8GB free) and no CPU usage (0% in task manager). We have so many tests that this delay is causing our builds to timeout (we have a hard stop at 6 hours and 40 minutes to prevent runaway builds from never stopping).

The one thing that may be suspect is that open connections reported from netstat seem to be growing over time. Perhaps there is a connection leak? I've attached the netstat output.

I'm wondering if Chrome auto-updating is the cause and that there is a new bug in a recent chrome version (chrome is up to date and I've downloaded the latest ChromeDriver to try to fix the issue) 

Let me know if there is any other information I can gather that would assist with troubleshooting this issue. 
netstat.log

PeterJeffreyGale

unread,
Nov 12, 2014, 3:09:17 AM11/12/14
to seleniu...@googlegroups.com
Are all your chrome driver.exe processes getting killed properly after the chrome sessions are closed?

Andrew Robinson

unread,
Nov 12, 2014, 10:38:47 AM11/12/14
to seleniu...@googlegroups.com
Yes, there is only ever one chromedriver.exe in the task manager.

PeterJeffreyGale

unread,
Nov 12, 2014, 12:31:34 PM11/12/14
to seleniu...@googlegroups.com
Did you try reinstalling an older version of Chrome to see if that clears the issue?

Andrew Robinson

unread,
Nov 12, 2014, 1:05:17 PM11/12/14
to seleniu...@googlegroups.com
Chrome auto-updates itself. Searching google on the topic doesn't
provide a clear way to stop this from happening. Is there a way to
download an older version and stop chrome from updating?

PeterJeffreyGale

unread,
Nov 12, 2014, 2:23:43 PM11/12/14
to seleniu...@googlegroups.com
Just havinga look at rolling back Chrome, but in the meantime if might be worth checking if your user's temp directory has got filled with junk ... that often causes me similar problems with browsers slowing down:

See:  %USERPROFILE%\AppData\Local\Temp


PeterJeffreyGale

unread,
Nov 12, 2014, 3:00:12 PM11/12/14
to seleniu...@googlegroups.com
Ok ... I managed to get my version of Chrome rolled back now.

This page show hoow to disable chrome updates by navigating to "chrome://plugins" from withiin your current version of Chrome and disabling the "Google Update" plaugin
http://blog.doofix.com/how-to-stop-google-chrome-from-automatic-update/

Then you need to uninstall your current (latest) version of Chrome.

I found links for downloading Chrome here:http://www.oldversion.com/windows/google-chrome/
and here: http://www.oldapps.com/google_chrome.php

... but the latter now just links to the latest download so Google are obviously trying to avoid anyone using old versions, but using the fist page I got a working version of v25 installed.

This link: https://productforums.google.com/forum/#!topic/chrome/IVNzgSnvIOE seems to confirm that rolling back is not recommended, bu I think I've got it workign ok.

When opening v25 I got error messages complaining about my profile so I followed the instructions here to set up a new profile: https://support.google.com/chrome/answer/142059?hl=en

Lastly, I got error messages from ChromeDriver saying it only supports versions of Chrome over 30, so I had to roll back to an old version ... I had to go back to v2.1 (which I think was called v21 at the time) to get my old version running with webdriver again.

If you do get Chrome rolled back and it your test work as normal again, then you perhaps have evidence of a bug in the latest versions of Chrome/Chrome driver but you might do some more through checks before raising the issue .. you coudl log it against the ChromeDriver project as I believe the developers there work for Google anyway and will have contacts for the Chrome team.

Otherwise, if your tests still run slow, then it rules out a Chrome update as the issue.


Andrew Robinson

unread,
Nov 17, 2014, 5:10:42 PM11/17/14
to seleniu...@googlegroups.com
Chrome 25 is too old for our usage. I tried installing v32 from links, but it just is a downloader that gets the latest version from google chrome and installed v38 again. I'm not seeing any good way to back out the current version to an older version (closest to but not after October would be best) as there seem to be no installers for the older versions.

I reboot our computer and the issue happened immediately (before I could get in about a day of testing before the issue).

PeterJeffreyGale

unread,
Nov 17, 2014, 6:22:27 PM11/17/14
to seleniu...@googlegroups.com
Moving to an older as old as v25 isn't suggested as a long term solution. It's just to ascertain whetherthe problem only occurs with the latest version.

Andrew Robinson

unread,
Nov 18, 2014, 3:26:55 PM11/18/14
to seleniu...@googlegroups.com
Okay, got v25 installed. There is no "Google Update" plug-in, nor a registry key, so it will hopefully not auto update. In the about screen I see that the updating code is not working:

Version:0.9 StartHTML:0000000137 EndHTML:0000000783 StartFragment:0000000173 EndFragment:0000000747 SourceURL:chrome://help-frame/ Update failed (error: 3)An error occurred while checking for updates: Update check failed to start (error code 3: 0x80040154). 

I'll report back on how things go with v25 

PeterJeffreyGale

unread,
Nov 18, 2014, 3:37:32 PM11/18/14
to seleniu...@googlegroups.com
ok

Andrew Robinson

unread,
Nov 18, 2014, 4:38:42 PM11/18/14
to seleniu...@googlegroups.com
I tried ChromeDriver 2.1 and 2.0 and neither work

00:19:25.719 Driver info: org.openqa.selenium.chrome.ChromeDriver'
00:19:25.719 org.openqa.selenium.WebDriverException: unknown error: Chrome version must be >= 27.0.1453.0

Considering ChromeDriver 2.0 is the oldest one, I'm not sure how I can test chrome v25

Andrew Robinson

unread,
Nov 18, 2014, 4:39:28 PM11/18/14
to seleniu...@googlegroups.com
Forgot this line:
00:19:24.719 Started ChromeDriver (v2.0) on port 21651

PeterJeffreyGale

unread,
Nov 19, 2014, 5:15:53 AM11/19/14
to seleniu...@googlegroups.com
I'm pretty sure I got Chrome version 25 with chromedriver v2.0, as noted, though I have reverted to a later version and don't have time to try it again myself.

Perhaps it's just best to log it as an issue against the current Chromedriver (earlier versions aren't supported anyway) and see what the dev's can suggest to identify the problem.

PeterJeffreyGale

unread,
Nov 19, 2014, 6:05:32 AM11/19/14
to seleniu...@googlegroups.com
Looks like there is a specific chromedriver user group too: https://groups.google.com/forum/#!forum/chromedriver-users that is referenced as the first point of support on the Chromedriver page.

Might be worth a try since it doesn't yet seem like a bug that can be replicated.


Reply all
Reply to author
Forward
0 new messages