I have a process (an old Tomcat running Java 1.2) which is running out of File Descriptors. Running lsof -p <pid> lists a whole bunch of IDLE sockets. In fact, over time, this number increases until the error happens. I have another Tomcat, with the same configuration, on another machine which runs the same software (we have the workload split in two) and it never runs into this problem. In trying to track the error down, the following questions surfaced.
What IS an IDLE socket? (as reported by lsof) The sockets that I find look like:
java 10070 netrez 17u IPv4 0x3023d66be68 0t10553 TCP xxxxxx:*->yyyyyy pegs.com:* (IDLE)
where xxxxxx is the name of the machine Tomcat is running on and yyyyyy is the machine Apache is on.