title: Why are parallel tests failing with “Selenium::WebDriver::Error::WebDriverError invalid session id”?
body: <p>I am testing a Rails app on CircleCI. I'm running parallel tests in separate containers. </p>
  
  <pre><code>#.circleci/config.yml
  ...
  jobs:
    build:
      parallelism: 2
      ...
  </code></pre>
  
  <p>One container always fails with: </p>
  
  <pre><code>Selenium::WebDriver::Error::WebDriverError:
                invalid session id
  </code></pre>
  
  <p>If I change configuration and only run 1 container, all my tests pass. </p>
  
  <p>I guess I have configured something incorrectly for parallel testing. Can anyone help me to understand why Selenium might be expecting a session that does not exist, and where I should be looking to debug this?</p>