Find the answer to your Linux question:
Results 1 to 3 of 3
Hi there, When running my (I/O intensive) code on SUSE Linux 10, I sometime come accross a "Too many open files" error. I am sure there is a bug in ...
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    9

    Too many open files error....how to check?

    Hi there,

    When running my (I/O intensive) code on SUSE Linux 10, I sometime come accross a "Too many open files" error. I am sure there is a bug in my code, but how would I best approach this?

    For example, what's the command / tool to report the number of open (file) handles?

    Thank you

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    You can increase the limit of max files in /proc/sys/fs/file-max.
    First check the current value with "cat /proc/sys/fs/file-max".
    For example, to increase the value up to 24724 type this command (as root):

    Code:
    echo 24724 > /proc/sys/fs/file-max
    Regards

  3. #3
    Linux Enthusiast apoorv_khurasia's Avatar
    Join Date
    Feb 2005
    Location
    Laurasia
    Posts
    624
    Try to follow the UNIX principle of programming by not making any changes to other programs in order to make ur code work. That limit on maximum number of open file handles exists for a reason...
    "There is no sixth rule"
    --Rob Pike
    Registered Linux User: 400426 home page

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...