RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1695014 - Clarify the ability to change the NOFILE limit
Summary: Clarify the ability to change the NOFILE limit
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 7.7
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-02 09:56 UTC by Cedric Buissart
Modified: 2019-11-23 22:50 UTC (History)
8 users (show)

Fixed In Version: 389-ds-base-1.3.9.1-5.el7
Doc Type: Bug Fix
Doc Text:
Cause: Trying to change the NOFILE limits (limit of opened file descriptors that the kernel will allow) Consequence: The server unexpectedly uses a different FD limit via a configuration attribute setting. Fix: Document how the server overrides the systemd FD limits. Result: The server complies with the documentation
Clone Of:
Environment:
Last Closed: 2019-08-06 12:59:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2152 0 None None None 2019-08-06 12:59:29 UTC

Description Cedric Buissart 2019-04-02 09:56:04 UTC
Description of problem:

Trying to change the NOFILE limits (limit of opened file descriptors that the kernel will allow), I opened the dirsrv@.service.
It redirects to /etc/sysconfig/dirsrv.system

```
# if you need to set other directives e.g. LimitNOFILE=8192
# set them in this file
.include /etc/sysconfig/dirsrv.system
```

So I opened the said file and changed the data there, as described :

```
# This controls the number of file handles avaliable. File handles
# correlate to sockets for the process, and our access to logs and
# databases.
#LimitNOFILE=16384
LimitNOFILE=65535
```

And restarted the service.

Upon restart, *only* the hard-limits was modified. Soft limit was still 1024 :

```
# cat /proc/$(cat /var/run/dirsrv/slapd-CEDRIC-COM.pid)/limits  | grep -e Limit -e "open files"
Limit                     Soft Limit           Hard Limit           Units     
Max open files            1024                 65535                files
```

Upon further search, it appears that ns-slapd overrides its NOFILE soft limits to `nsslapd-maxdescriptors` from cn=config, and defaults to 1024.

I would propose the following changes :

1) by default, if nsslapd-maxdescriptors isn't set in dse.ldif, ns-slapd should not override its corresponding soft limit value. (especially in systemd-enabled system, where there is already a configuration for this)

2) The comments in /etc/sysconfig/dirsrv.system should make it clear that there is a nsslapd-maxdescriptors cn=config entry that may/will override the soft limit

Comment 2 Akshay Adhikari 2019-05-27 12:10:14 UTC
Build Tested: 389-ds-base-1.3.9.1-7.el7.x86_64

Steps:

1) In /etc/sysconfig/dirsrv.systemd set LimitNOFILE to some value eg:(21345)

2) Restart the server.

3) Check the Soft limit also is modified to the value which was set (21345)

[root@web9 ~]# cat /proc/$(cat /var/run/dirsrv/slapd-{instance_name}.pid)/limits  | grep -e Limit -e "open files"
Limit                     Soft Limit           Hard Limit           Units     
Max open files            21345                21345                files     

4) Check comments in /etc/sysconfig/dirsrv.systemd which makes it clear that there is a configuration setting in Directory Server: nsslapd-maxdescriptors that can override the soft limit.

# databases.  Note, the configuration setting in Directory Server,
# "nsslapd-maxdescriptors", can override this limit.
#LimitNOFILE=16384


Marking it as VERIFIED.

Comment 4 errata-xmlrpc 2019-08-06 12:59:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2152


Note You need to log in before you can comment on or make changes to this bug.