• Post Reply Bookmark Topic Watch Topic
  • New Topic

jvm and pipes  RSS feed

 
Adi Shamir
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a java program that open some threads (not too many. around 15-20 threads). Sometimes I get the following exception:

java.io.IOException: Too many open files
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:54)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566)
at java.lang.Runtime.exec(Runtime.java:428)
at java.lang.Runtime.exec(Runtime.java:364)
at java.lang.Runtime.exec(Runtime.java:326)

So I used lsof and I discovered that I have hundreds of pipes. I have hundreds of lines similar to the following:

java 18732 boazy 21u FIFO 0x30007b52908 0t0 263566 (fifofs) PIPE->0x30007b52820

My questions are:
1. What are those pipes? How does the jvm uses them?
2. When does the jvm closes those pipes?
3. Is it possible that I have pipes leak?
4. How do I solve my problem?

I'll be greatful for any related information that will help me understand and solve the problem.

Thanks,
Boaz.
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My questions are:
1. What are those pipes? How does the jvm uses them?
2. When does the jvm closes those pipes?
3. Is it possible that I have pipes leak?
4. How do I solve my problem?


1) Interprocess communication, including thread to thread communication.
2) I have no idea
3) Maybe, but if you're not managing them it seems unlikely that that is the case.
4) I would start by bumping up your file descriptor limit. On most Unix systems it would be something like "ulimit -n 1024" where the 1024 may have a system set maximum. you should see where you're at right now by just doing a "ulimit -n".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!