Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


OpenVZ VPS open files limit, how to modiffy permanently?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OpenVZ VPS open files limit, how to modiffy permanently?

postcdpostcd Member
edited February 2016 in Help

Dear LET members,

i wanted to ask how to permanently modify open files limit?

when i do "ulimit -a | grep open" command in the VPS, i see:

open files (-n) 1024

also i added following lines to the /etc/security/limits.conf

  • soft nofile 51200

  • hard nofile 51200

And executed: # ulimit -n 51200

But once i exit the terminal and login again i see "ulimit -a | grep open" shows old value 1024

:( so how to change it permanently? Can i see current open files usage?

If i need to do anything on the OpenVZ host server or on the VPS, please let me know what command? Thank you

Comments

  • perennateperennate Member, Host Rep

    Is this for root user or another user? Because for root user, wildcard does not affect root, you need to write:

    root soft nofile 51200
  • postcdpostcd Member
    edited February 2016

    Yes, i login as root. and in /etc/security/limits.conf i have

    • soft nofile 51200
    • hard nofile 51200

    (asterisks before words soft and hard, LET convert asterisks to dotted list)

    i need to change it to:

    root soft nofile 51200

    >

    root hard nofile 51200

    ?

  • after editting etc/security/limits.conf in OpenVZ VPS, i see it has no impact on "ulimit -a" output. "ulimit -n numberhere" has impact on current shell session only.

  • WSSWSS Member

    If, for whatever reason, you're logging in as root anyhow, just add that to your .profile or login executed script if not bash. For obvious reasons, I don't suggest doing so at boot time.

Sign In or Register to comment.