2

我有一台具有 32 Gb RAM 的服务器,我想并行运行 70 个 firefox 实例。我尝试像这样简单的硒服务器配置:

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 网格 2,但它仍然无法正常工作(我得到同样的错误)。可能我必须将 DPOOL_MAX 设置为超过 1024?

4

0 回答 0