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.
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?
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
Is this for root user or another user? Because for root user, wildcard does not affect root, you need to write:
Yes, i login as root. and in /etc/security/limits.conf i have
(asterisks before words soft and hard, LET convert asterisks to dotted list)
i need to change it to:
>
?
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.
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.