Solved

java.io.IOException: Not enough space

Posted on 1997-07-21
4
2,305 Views
Last Modified: 2008-02-26
Hi,

I use JDK 1.1 in Sol 2.5

My program starts sevral sub processes (about 7, not a lot ) at he same time. Some of these processes are Java processes some native.

Does anybody can tell me, what might cause this exception.
What "space" means in this context

java.io.IOException: Not enough space
        at java.lang.UNIXProcess.<init>(UNIXProcess.java)
        at java.lang.Runtime.exec(Runtime.java)
        at java.lang.Runtime.exec(Runtime.java)


thanks
Dmitry
0
Comment
Question by:dmitry175
4 Comments
 
LVL 1

Expert Comment

by:katya062697
ID: 1223522
This exception is usually thrown when java tries to write a file and there is not enough space on the system. This should not have anything to do with threads, as your exception is from class java.io, which only deals with files. Are you doing any file I/O? If not, maybe one of your processes makes UNIX write a temp file or something of the sort that would need disk space. Check both your available disk space and memory (maybe it has to swap too much due to a large number of processes -- just a guess).

Hope this helps
0
 

Author Comment

by:dmitry175
ID: 1223523
Katya thanks for you responce.

  I checked both disk space and memory, before I send this Q out, I'm sure I have enought of both.
  My second assumtion was that I'm running out of file descriptors, since by default I have only 64 and after my program starts running it take 45 right away (mostly internal java libs). And each sub process takes 3 file descriptors (stdin, stdout, stderr). I increased it to 128 but still have same problem.
   It's some kind of IO proble but I cannot figure out what space meens in this context, Java  tells you if ran out of memmory or disk.
  Thanks , Dmitry

0
 
LVL 4

Expert Comment

by:rembo
ID: 1223524


I suggest running the whole thing under truss -f.  If you
post the truss output, I can tell you what is wrong.

-Tony


0
 
LVL 1

Accepted Solution

by:
wex earned 150 total points
ID: 1223525
I'm not sure how you can be so sure that you have enough memory, disk and particularly swap space.  Your writeable-file disk area may be big enough but you could be exceeding your swap partition on the disk.

If you have another machine available, try running the program on the other machine.  Also, try running after killing off other known memory-hog programs (like Netscape) and see if that makes a difference.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ArrayIndexOutOfBoundException 9 81
egit plugin on eclipse 8 63
javap bin 2 34
Java Restore security prompts not working 10 12
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question