java.io.IOException: error=24, Too many open files

639 views
Skip to first unread message

Vlad Alyukov

unread,
Oct 19, 2009, 8:23:58 AM10/19/09
to webd...@googlegroups.com
i use webdriver remote server for execute my tests, some time later, webdriver show exception:


browser: firefox 3.5.3
webdriver-remote-server: 0.9.7376
webdriver-firefox: 0.9.7376
jetty-webapp: 7.0.0.pre5

===
2009-10-19 12:14:52.813::INFO: org.openqa.selenium.remote.server.DriverServlet-12960684: Executing: [new session: Capabilities [browserName=firefox, javascriptEnabled=false, platform=ANY, version=]] at URL: /session)
2009-10-19 12:14:52.840::INFO: org.openqa.selenium.remote.server.DriverServlet-12960684: Exception: org.openqa.selenium.WebDriverException: java.io.IOException: Cannot run program "/usr/bin/firefox": java.io.IOException: error=24, Too many open files
System info: os.name: 'Linux', os.arch: 'i386', os.version: '2.6.24-7-pve', java.version: '1.6.0_16'
Driver info: driver.version: firefox
===

===
package ru.sibirenergo.billing.server;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
import org.openqa.selenium.remote.server.DriverServlet;

public class Main {

private Server server = new Server();

public Main() throws Exception {
WebAppContext context = new WebAppContext();
context.setContextPath("");
context.setWar(".");
server.addHandler(context);
context.addServlet(DriverServlet.class, "/wd/*");
SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(3000);
server.addConnector(connector);
server.start();
}

public static void main(String args[]) throws Exception {
Main server = new Main();

}
}
===

Simon Stewart

unread,
Oct 19, 2009, 2:44:13 PM10/19/09
to webd...@googlegroups.com
Do your tests ever call "WebDriver.quit()"? If not, then you're
leaking resources, and that may be part of the problem (though I find
it hard to believe unless you're running _lots_ of tests)

Simon

Darren Rowley

unread,
Oct 19, 2009, 6:19:08 PM10/19/09
to webdriver
To help diagnose the problem try running: lsof to list open files
around the time of the failure, you can then try to find out what/when
the problem happens. To debug this exact problems on server apps in
the past I have written a little bash scripts that loops and lists the
open files as my test run calling.

lsof | grep -c firefox

Alternativelty you could try increasing the ulimit to allow more than
1024 open files per process but to be honest you should try to get to
the bottom of the problem. It could be your application under test is
somehow causing firefox to keep file sopen somehow..

Darren.
Reply all
Reply to author
Forward
0 new messages