LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2020, 11:47 AM   #1
c0nfuser
LQ Newbie
 
Registered: Mar 2006
Posts: 4

Rep: Reputation: 0
Confused with fd limit setting difference on the system level or on the service level (systemctl)


Hi!

I would like to change the file descriptor soft limit for a specific process which is executed via a systemctl service and is actually a server which creates socket connections therefore I would like to increase the limit to more than 100k

In this case there is the option of editing directly /etc/security/limits.conf which as far as I know it will apply the changes for the user but

recently I learned also that systemctl provides this options

Code:
LimitNOFILE=     ulimit -n             Number of File Descriptors
Which I would like to ask, are those 2 settings are independent? I mean if I will set a value directly to the systemctl LimitNOFILE=100000, do I need to edit also the /etc/security/limits.conf ?


Thanks!

Last edited by c0nfuser; 10-28-2020 at 12:17 PM.
 
Old 10-29-2020, 06:58 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Reading the description of this option in https://www.freedesktop.org/software...temd.exec.html, it seems obvious that LimitNOFILE overrides ulimit settings if the service is a system service.

In case of a user service, a normal non-privileged user can't increase limits above ulimit settings.

In short, if you are talking about a system service (which is the usual case), you don't have to edit limits.conf.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
systemctl status postgresql-tst.service starts the service if service is stopped MarianForums Linux - Newbie 7 11-03-2018 03:02 PM
Restart systemctl*daemon​ - systemctl command not found cjosephl Linux - Newbie 7 11-11-2017 04:53 PM
Problem with MySQL install on virt CentOS,no /var/lib/mysql/mysql.sock , systemctl start mysqld.service dont run the service Positive1 CentOS 1 08-13-2016 03:33 AM
Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and anis123 Linux - Server 0 09-16-2015 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration