LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux File Descriptor is 0 (https://www.linuxquestions.org/questions/linux-newbie-8/linux-file-descriptor-is-0-a-739050/)

blumdude 07-09-2009 08:07 PM

Linux File Descriptor is 0
 
I run the command cat /proc/sys/fs/file-nr and get the results:

5540 0 788448

That middle number being 0 bothers me.

I am running some Oracle applications (BPm, Weblogic, WCI) and it keeps responding with "too many files open" and it hangs the system. Rebooting works for about twelve hours.

ulimit -n is 65536

My guess is the dynamic allocation of new file descriptors is not being done. How can I test this theory, and, more importantly, how can I make that middle number positive?

Linux version: RedHat AS 4

blumdude 07-10-2009 01:11 AM

bump
 
bump

Wim Sturkenboom 07-10-2009 03:10 AM

Bumping is plain stupid because posts with 0 replies will (for two days) be bumped automatically after 24 hours. There are also users who concentrate on posts with 0 replies and they will not find this one.
So you have shot yourself in the foot.

jeromeNP7 07-10-2009 05:14 AM

The second column of the result line (being '0' in your case) means that there are no more free allocated file descriptors available, and this conforms to the error statement "too many files open" which hangs the system. The only way to make that middle number positive is by finding the script or application that open files constantly without closing any of them. Most likely some daemon process, because files are closed by the system if the caller application terminates. Maybe try to restart some daemons (quasi terminating them) while monitoring the 'cat /proc/sys/fs/file-nr' output to spot which daemon affects file descriptors the most.

A good summary on 'cat /proc/sys/fs/file-nr' is available at http://www.netadmintools.com/art295.html.

Linux

LilyHan 07-10-2009 06:37 AM

Quote:

Originally Posted by jeromeNP7 (Post 3603126)
The second column of the result line (being '0' in your case) means that there are no more free allocated file descriptors available, and this conforms to the error statement "too many files open" which hangs the system. The only way to make that middle number positive is by finding the script or application that open files constantly without closing any of them. Most likely some daemon process, because files are closed by the system if the caller application terminates. Maybe try to restart some daemons (quasi terminating them) while monitoring the 'cat /proc/sys/fs/file-nr' output to spot which daemon affects file descriptors the most.

A good summary on 'cat /proc/sys/fs/file-nr' is available at http://www.netadmintools.com/art295.html.

http://www.linuxinsight.com/proc_sys_fs_file_nr.html

pixellany 07-10-2009 07:10 AM

Quote:

Originally Posted by Wim Sturkenboom (Post 3603039)
Bumping is plain stupid because posts with 0 replies will (for two days) be bumped automatically after 24 hours. There are also users who concentrate on posts with 0 replies and they will not find this one.
So you have shot yourself in the foot.

AND---at 6PM Pacific time, it is the middle of night in Europe and much of Asia. This means that a large percentage of your potential helpers are asleep.
Patience!!

blumdude 07-10-2009 02:22 PM

thanks
 
First post here, so sorry for the manual bump...

So I used the information provided to start more of my searching and end my confusion... apparently my version of the kernel will always have that middle number = 0, and is 'nothinig I should worry about'.

Which leaves me at square one...

I believe I may have found a problem, but I am not sure how it relates to anything.

When excuting a Weglogic domain startup, I had done it through VNC Viewer, without putting the process into the background. This is the only thing I run through VNC, and I run it from an xterm window.

When I come back to the window after my main application is unresponsive, I notice a Firefox window is open, trying to access a couple custom .pdf files. The application code has a call to open a new browser on the local user machine with that pdf, but it appears that also on the server itself a browser is opened and prompts the user to either save or open the file.

Could this extremely strange (by my estimatation) behavior be causing the application to get a java Socket.Exception of "too many file open"?

I have exhausted all file descriptor and soft and hard values. Files open is roughly 7000, with process max allowed being 64k files, and system max allowed being 700,000+ I am not hitting any limit, yet the java process thinks there are too many files open.


All times are GMT -5. The time now is 08:20 PM.