title: Chrome with Selenium closes immediately after trying to start again after closing it with .quit()
body: <p>My program has some sort of memory problem. After a while, chrome stops working properly and displays a page that says &quot;Aw shucks. Ran out of memory.&quot; I've been unable to find a solution to this that is in Python, so as a roundabout solution, I have my code setup to close the webdriver process and then restart it to clear the memory and pick up where it left off.</p>
  <p>Quitting the webdriver process works fine. However, whenever I try to restart it, it opens for a second, then closes and I don't know why. Here is the code:</p>
  <pre><code>from selenium import webdriver
  driver = webdriver.Chrome()
  
  #some code operations happen here that have nothing to do with the problem I'm having. It just navigates to different URLs.
  
  if current_iteration &gt;= 1500:
          print('Iteration greater than 1500. Restarting chrome driver...')
          driver.quit()
          current_iteration = 0
          time.sleep(5)
          print('Starting chrome process then waiting 20 seconds...')
          webdriver.Chrome()
          time.sleep(20)
  </code></pre>
  <p>After the program reaches this point, it just says <code>DevTools listening on ws://</code> followed by a bunch of numbers. The chrome webdriver window then pops up, then closes after one second. The next bit of code is <code>driver.get()</code> with a URL to navigate to, but it exits with a long error, which I can only assume is because the chrome webdriver window is closed and not open.</p>
  <p>The webdriver and selenium are both up to date. What could be the problem?</p>