Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
slapd open files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nizar
Apprentice
Apprentice


Joined: 19 Dec 2003
Posts: 268
Location: localhost

PostPosted: Wed Nov 28, 2018 2:12 pm    Post subject: slapd open files Reply with quote

Hello,

Running openldap-2.4.44, gcc-7.3.0, glibc-2.26, kernel-4.14.65

/etc/sysctl.conf
Code:

net.core.somaxconn = 256
fs.file-max = 1048576


slapd running as ldap user

/etc/security/limits.conf
Code:

ldap           soft    nofile          168304
ldap           hard    nofile          187456


checking the pid of slapd:
Code:

cat /proc/5829/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             193106               193106               processes
[b]Max open files            1024                 4096                 files     [/b]
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       193106               193106               signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                   
Max realtime priority     0                    0                   
Max realtime timeout      unlimited            unlimited            us 


but: su ldap -c 'ulimit -aHS' -s '/bin/bash'
Code:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 193106
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 168304
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) 193106
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


But quickly ldap starts to decline connections, and many entries in /var/log/messages about "slapd[14255]: warning: cannot open /etc/hosts.allow: Too many open files"

Why the limits are different, /proc/PID/limits vs ulimit command?
Where can I increase the limit of open files for ldap?

Many thanks,.
N.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum