Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

exec() limit

0 views
Skip to first unread message

Richard Bromley

unread,
Feb 14, 1997, 3:00:00 AM2/14/97
to

When I try to exec() more than 9 Processes
at a time, I get the following error message:

java.io.IOException: Too many open files
at java.lang.UNIXProcess.<init>(UNIXProcess.java)
at java.lang.Runtime.exec(Runtime.java)
at java.lang.Runtime.exec(Runtime.java)
at GSFEServer.execScheduledProcess(GSFEServer.java:308)
at ScheduleThread.run(ScheduleThread.java:28)

Does anyone know whether this is a JVM imposed or
Unix imposed limit? Is there a way round this??

Ta much,
Richard

Mitchell S. Baltuch

unread,
Feb 14, 1997, 3:00:00 AM2/14/97
to Richard Bromley

[Posted and mailed]

In article <330439...@memex.co.uk>,
Richard Bromley <ric...@memex.co.uk> writes:

> java.io.IOException: Too many open files
> at java.lang.UNIXProcess.<init>(UNIXProcess.java)
> at java.lang.Runtime.exec(Runtime.java)
> at java.lang.Runtime.exec(Runtime.java)
> at GSFEServer.execScheduledProcess(GSFEServer.java:308)
> at ScheduleThread.run(ScheduleThread.java:28)
>
> Does anyone know whether this is a JVM imposed or
> Unix imposed limit? Is there a way round this??

This is a system imposed limit. Most Unix operating systems allow 64 open
file handles per process. When you exec a process, Java creates pipes to
that process for stdin, stdout, stderr. So with 9 processes, that is
already 27 file handles open. You own java process has to have at least the
same number of handles, so now you are up to 30. My suspicion is that your
OS is set to 32 file handles, or you have a bunch of other things going on
in your program.

Mitch
____________________________________________________________________________
Mitchell S. Baltuch Unidata Program Center
Software Engineer Univ. Corp for Atmospheric Research
mi...@unidata.ucar.edu WWW: http://www.unidata.ucar.edu/
Java Resource Page: http://www.unidata.ucar.edu/staff/mitch/java.html

0 new messages