我有一台32 Gb RAM的服务器,我希望并行运行70个firefox实例。我尝试这样简单的selenium服务器配置:
java -jar /usr/lib/selenium/selenium-server-standalone.jar -port 4444 -maxSession 100 -DPOOL_MAX=1024 -trustAllSSLCertificates
但是当我并行运行70个测试时,PHP selenium webdriver返回错误:
exception 'WebDriverCurlException' with message 'Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"firefox_profile":"....","browserName":"firefox","javascriptEnabled":true}}
Operation timed out after 300000 milliseconds with 0 bytes received' in /app/vendors/SeleniumWebdriver/WebDriverExceptions.php:39
Stack trace:
#0 /app/vendors/SeleniumWebdriver/remote/HttpCommandExecutor.php(213): WebDriverException::throwException(-1, 'Curl error thro...', Array)
#1 /app/vendors/SeleniumWebdriver/remote/RemoteWebDriver.php(74): HttpCommandExecutor->execute(Object(WebDriverCommand))
然后我尝试使用一个集线器和两个节点创建selenium grid 2但它仍然无法正常工作(我得到相同的错误)。可能我必须将DPOOL_MAX设置为超过1024?