OutOfMemory异常selenium服务器2.0b3

时间:2011-04-21 20:56:48

标签: selenium-webdriver

我们刚刚部署了selenium server 2.0b3(从1.0.3升级)。它 看起来有一些相当严重的内存泄漏--OutOfMemory 在超过30分钟的运行期间抛出异常。

是否有任何直接的解决方法来处理内存泄漏 2.0b3 selenium服务器?

我希望获得2.0b3源代码,应用各种补丁 到目前为止提交并使用此。但是,当我拉这个时:

svn checkout http://selenium.googlecode.com/svn/tags/selenium-2.0-beta-3/ 硒-2.0-β-3

并使用

构建

./ go clean release

生成的二进制文件似乎没有 DefaultSelenium.class。不知道这里发生了什么......

或者,我想也许我们将开始使用 最新发布候选人。但是,看起来像 DefaultSelenium.class也不在这里。

我是否需要升级客户端代码才能使用WebDriver?我想 事情被认为是向后兼容的。

建议?

2 个答案:

答案 0 :(得分:1)

为了向后兼容,你应该像这样使用WebdriverBackedSelenium:

FirefoxDriver driver = new FirefoxDriver(); //or any of the other drivertypes

Selenium selenium = new WebDriverBackedSelenium(driver, START_URL);

答案 1 :(得分:1)

具体是什么样的OutOfMemoryException被抛出?堆? GC开销限制?其他

我得到了“超出GC开销限制”,有时也“超出堆空间”作为Exception中的消息(1.0.3和2.0.b3,使用ruby selenium-client-1.2.18),并且发现你的线程在selenium-developers google group。[1]你有没有跟着那里的回应?

关闭selenium-server(-log-browserSideLog)的日志已经停止了我的OOME。我可以等到下一个selenium-server发布,以获得Kristian的补丁。[2]

[1] http://groups.google.com/group/selenium-developers/browse_thread/thread/30d38475a16985a9/0db1af2456304f9f?hl=en&lnk=gst&q=outofmemory#0db1af2456304f9f

[2] http://code.google.com/p/selenium/source/detail?r=11872