how to increase ldap max open files ?

Hi,

I would like to increase max open files for ldap from 1024 to 4096 or more

How do I do that with openSuse ?

Previously I did that with Mandriva, edit /etc/sysconfig/ldap and uncomment MAXFILES=4096, but this is not working with openSuse.

Any idea how to increase MAXFILES for openldap in openSuse ?

Thanks.

Hi
What does the output from;


ulimit -n
cat /proc/sys/fs/file-max
cat /proc/`pidof slapd`/limits

I think if ulimit isn’t set to 4096, that’s possibly why.


spare:~ # ulimit -n
1024


spare:~ # cat /proc/sys/fs/file-max
47358


spare:~ # cat /proc/`pidof slapd`/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             3726                 3726                 processes
Max open files            1024                 4096                 files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       3726                 3726                 signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

which file should i edit to increase it ?

thanks.

On Mon 24 Nov 2014 03:06:16 AM CST, jiunnyik wrote:

spare:~ # ulimit -n
1024

which file should i edit to increase it ?

thanks.

Hi
The way I understand it is it’s a soft limit, so should be able to
change via;


ulimit -n 4096
ulimit -a

You may have to configure it specifically with pam and limits.conf
for ldap (see man limits.conf)? I’m not an ldap user (except for
defaults), maybe other can help…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.28-4-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

i edit /etc/security/limits.conf, add in


ldap            soft    nofile          4096

and I run “cat /proc/pidof slapd/limits” as root


spare:~ # cat /proc/`pidof slapd`/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             3726                 3726                 processes
Max open files            1024                 4096                 files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       3726                 3726                 signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

but when i run ulimt -a as ldap user, i get


ldap@spare:~> ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 3726
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 4096
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 3726
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

the openfiles are different.

If you want the service to have more file handles, you need to edit the systemd file; /usr/lib/systemd/system/slapd.service

Add;
LimitNOFILE=32768

Under [Service], then issue systemctl daemon-reload and systemctl restart slapd. Ran into the same issue when tuning Varnish for tens of thousands of simultaneous connections :slight_smile:

Miuku,

no slapd.service in /usr/lib/systemd/system

im running opensuse 13.1

thanks.