title: Selenium Chromedriver Hangs?
body: <p>I have a long running python app that will periodically (every 30-60 seconds) open a webpage with selenium and chrome driver, run some javascript and take a screenshot. Its running on an EC2 ubuntu instance with chrome in Xvfb and for the most part everything is working, except intermittently the program will hang. It is happening on one of these lines:</p>
  
  <pre><code>    options = Options()
      options.add_argument("--disable-web-security")
      options.add_argument("--webdriver-logfile=webdrive.log")
      dc = DesiredCapabilities.CHROME
      dc['loggingPrefs'] = {'browser': 'ALL'}
      driver = webdriver.Chrome(chrome_options=options, desired_capabilities=dc)
      driver.get(url);
  </code></pre>
  
  <p>(I don't have an exact line but I know from debug statements I have put in that it is somewhere in between here)</p>
  
  <p>Unfortunately, the program doesn't crash so it doesn't have any error messages, its just waiting endlessly since 7pm last night. Running <code>strace -p 'python program pid'</code> returns: <code>wait4(-1,</code> and running <code>strace -p 'chromedriver pid'</code> returns <code>recvfrom(20,</code></p>
  
  <p>I can see in <code>ps axjf</code> that the process is still running, its just not doing anything. I'm sort of at a loss of what to do now, any suggestions?</p>
  
  <p>chromedriver version: 2.10.267518</p>
  
  <p>Google Chrome 40.0.2214.111</p>
  
  <p>Selenium (installed with pip): 2.42.1</p>
  
  <pre><code>#https://github.com/cgoldberg/xvfbwrapper
  xvfb = Xvfb(width=1920, height=1920)
  xvfb.start()
  </code></pre>
  
  <p>---- EDIT ----</p>
  
  <p>I have just updated to <code>ChromeDriver 2.14.313457</code> and <code>Selenium 2.44.0</code>, hopefully this will fix the issue. I'm going to leave this open for now. Thanks for the advice so far guys!</p>
  
  <p>---- EDIT ----</p>
  
  <p>So the service still ended up hanging. I'm wondering if this is because for every screenshot I close and restart google-chrome? Is this possibly causing a memory leak somehow? How could I diagnose this?</p>