Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1695014 - Clarify the ability to change the NOFILE limit
Summary: Clarify the ability to change the NOFILE limit
Keywords:
Status: POST
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
: ---
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-04-15 15:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

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


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