Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The ulimit command only sets the limit for the duration of that login session. To make the change permanent, you will need to update the configuration file that controls default limits on your system. On most distributions, the file is /etc/security/limits.conf. You can run "man limits.conf" to get more information on the format of the file and how to configure permanent limit changes.
Thanks reply ,
I would like to confirm what I need to do is add the following two lines to /etc/security/limits.conf , is it right ? if yes , I have to restart the server after update it , what can I do if I don't want to restart server ?
Code:
* hard nofile 65535
* soft nofile 4096
...and, less than 24 hours later:
Quote:
Originally Posted by sub320
May I know if I have to restart the server after add this line ?
Don't bump your own thread, unless you have new information to add...read the LQ Rules, Question Guidelines, and How to ask a smart question links.
Your question was answered very clearly in post #2...running that command sets it for THAT login session only. To set it system wide, you edit the file, and REBOOT. You were pointed to a man page for that file...did you read it?
And what you can do if you don't want to restart the server, is set the limit manually, and run whatever process you want from that session. That is your only option.
Correct: the limits.conf file is read by PAM (pam_limits.so) when the user logs in. You do not need to reboot the server for the configuration change to take effect on an interactive user session - the user simply needs to log out and back in.
If you are trying to change the limits in effect for a daemon/service process (for example, if you are trying to increase the limits for the mysqld service processes), you will need to stop and restart the service after making the configuration change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.