-1

Using python-selenium and pyvirtualdisplay, I would like to open about 10 different Firefox browsers simultaneously on a remote server. However, on both AWS and pythonanywhere the firefox driver starts throwing exceptions at around the fifth opened window:

WebDriverException: Message:The browsers appears to have exited before we could connect

I was never able to open more than 5 or 6 window simultaneously on either service. Is this a memory issue (isn't the point of the elastic architecture to account for this?)? A limit with the virtual display library?

There appears to be no issue if I try to open as many as 15 windows locally on my (very) old laptop. Is there anyway around this without using multiple accounts? Here is the code I am trying to execute:

from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(800,600))
display.start()

Browsers = {}

for i in range(10):

    Browsers['br_%s'%(i,)]=webdriver.Firefox()
gpanterov
  • 1,365
  • 2
  • 15
  • 25

1 Answers1

0

On PythonAnywhere, it's fairly likely that you're bumping into one of the limitations that we impose to prevent our users from trampling all over each other.

Glenn
  • 7,262
  • 1
  • 17
  • 23