pmgconfig ldapsync gets too many open files

Dec 20, 2018
6
1
43
49
Heilbronn
www.albert.coach
Hi,
I get a too many open files when trying to sync newly added ldap servers.

unable to open database file '/var/lib/pmg/ldapdb_6401/dnames_tmp22988.db': Too many open files

ok these are about 200 LDAP-Entries in ldap.conf but not much accounts.

is there a corresponding ulimit I could increase for that?

Best Regards,
Oliver
 
ok these are about 200 LDAP-Entries in ldap.conf but not much accounts.
oh - wow - that's indeed quite a large number

do you run the command as root on the commandline?
try setting `ulimit -n 4096` (from the default of 1024)
and running the command again

I hope this helps!
 
I'm running the command as root, so unlimited.
But found out that the pmgproxy who tries to access the db files is running as www-data, but increasing values for www-data seems not to help, or my value was still too small ;-)

Not a big thing, changed my ldap and combined them all to one entry ;-)

But maybe someone stumbles over that error, so maybe devs could add some hints to the docs how to set the ulimits.

Thank you
 
where did you get the error initially? (I read the thread-title and interpreted it as the command that caused the error-message to appear)?

regarding pmgproxy - I guess that you might need to set the ulimit in the pmgproxy.service file.

Not a big thing, changed my ldap and combined them all to one entry ;-)
glad you found a viable workaround :)
 
I've added my entries manually to the ldap.cfg, called pmgconfig sync (works fine), pmgconfig ldapsync, syncs maybe 20 servers and then throws that error for every new entry. The running proxy throws that error in the daemon log too.
args, I've set the value for the user in the limits.conf but thats not affecting the service. I'll try that, thank you
 
  • Like
Reactions: Stoiko Ivanov