How can i raise my Centos max open file descriptor limit?

Discussion in 'Site & Server Administration' started by ASTRAPI, Jan 6, 2011.

  1. #1
    Hello

    How can i raise my Centos max open file descriptor limit from 1024 to 65000 ?

    Thank you
     
    ASTRAPI, Jan 6, 2011 IP
  2. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is off the top of my head, If you have root access and are editing for root:
    sysctl -w fs.file-max=2500
    and to save it upon reboot add it to /etc/sysctl.conf in this format:
    fs.file-max = 2500

    Obviously not that low ;)

    Hopefully this helps
     
    SecureCP, Jan 6, 2011 IP
  3. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do i have to run the command and add also on /etc/sysctl.conf the:

    fs.file-max = 65000

    I must do both?

    Do i have to restart anything to start use this setting?

    Thank you
     
    ASTRAPI, Jan 6, 2011 IP
  4. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can run the command to have it take immediate effect and then add it to the sysctl file to make it 'stick' after reboot. Or just add it to the sysctl and reboot.
     
    SecureCP, Jan 6, 2011 IP
  5. SecureCP

    SecureCP Guest

    Messages:
    226
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    note, none of this applies to VPS's. Contact your host if that's what you're on.
     
    SecureCP, Jan 6, 2011 IP
  6. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ok thanks :)
     
    ASTRAPI, Jan 6, 2011 IP