Too many open named pipes in a java process...
Too many open named pipes in a java process..
In a java process (that uses JNI and socket communications), I get "Too
many open files" error.
When debugging further using lsof or pfiles, (with the process id), I
saw many named pipes (FIFO) in open state.
jsvc 10805 userid 951w FIFO 0,6 2989015 pipe
jsvc 10805 userid 952w FIFO 0,6 2988104 pipe
jsvc 10805 userid 953w FIFO 0,6 2989588 pipe
jsvc 10805 userid 954w FIFO 0,6 2988290 pipe
jsvc 10805 userid 955w FIFO 0,6 2988626 pipe
there are more than 500 processes opened.
Obviously there might have some streams I didn't close.
And the usage of Runtime.exec() will also cause the pipe here. The inputstream, outstream, errorstream should be closed.