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()