Dear,
Just before crash below message logged into system logs of servers:
Jun 11 23:01:37 musang kernel: Out of memory: Kill process 22184 (slapd) score 888 or sacrifice child Jun 11 23:01:37 musang kernel: Killed process 22184, UID 0, (slapd) total-vm:52226320kB, anon-rss:37170216kB, file-rss:1044kB
Although, my physical RAM size is 38 GB & actual database size is 32 GB.
Why is it not managing memory appropriately with the help from swap...? ----
*Thanks & Kind Regards,* Saurabh LAHOTI.
On Wed, 13 Jun 2018 at 15:57, Quanah Gibson-Mount quanah@symas.com wrote:
--On Wednesday, June 13, 2018 8:56 AM +0200 Michael Ströder michael@stroeder.com wrote:
On 06/12/2018 06:15 AM, Saurabh Lahoti wrote:
Frequently, our OpenLDAP instances crashes thereby leading us into
severe
disastrous results & outages for business.
While going through slapd logs, it always says " bdb_db_open: database: unclean shutdown detected; attempting recovery"
What could possibly go wrong here..?
Which OpenLDAP version are you using? Which OS?
What does openldap log before it crashes?
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
--On Wednesday, June 13, 2018 11:30 PM +0200 Saurabh Lahoti saurabh.astronomy@gmail.com wrote:
Jun 11 23:01:37 musang kernel: Out of memory: Kill process 22184 (slapd) score 888 or sacrifice child Jun 11 23:01:37 musang kernel: Killed process 22184, UID 0, (slapd) total-vm:52226320kB, anon-rss:37170216kB, file-rss:1044kB
This is not slapd crashing. This is linux OOM deciding to kill slapd for you because your system ran out of memory, and slapd was the last thing to ask for more memory. The total memory requirements for slapd are not limited to just what's stored in the database. And, given that you're using back-bdb or back-hdb, the memory requirements are significantly higher than the size of the DB, as slapd has to have multiple caches (at least 3) to help overcome performance issues in BDB (dncache, idlcache, entrycache).
Add more memory. Better, yet, ensure you are running the latest version of OpenLDAP and switch to back-mdb, which has significantly smaller memory requirements than back-bdb/hdb.
--Quanah
--
Quanah Gibson-Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
Quanah Gibson-Mount quanah@symas.com schrieb am 13.06.2018 um 22:57 in
Nachricht <CAFFD4AE97FF79CCE6BDFA5F@[192.168.1.10]>:
‑‑On Wednesday, June 13, 2018 11:30 PM +0200 Saurabh Lahoti saurabh.astronomy@gmail.com wrote:
Jun 11 23:01:37 musang kernel: Out of memory: Kill process 22184 (slapd) score 888 or sacrifice child Jun 11 23:01:37 musang kernel: Killed process 22184, UID 0, (slapd) total‑vm:52226320kB, anon‑rss:37170216kB, file‑rss:1044kB
This is not slapd crashing. This is linux OOM deciding to kill slapd for you because your system ran out of memory, and slapd was the last thing to ask for more memory. The total memory requirements for slapd are not limited to just what's stored in the database. And, given that you're using back‑bdb or back‑hdb, the memory requirements are significantly higher than the size of the DB, as slapd has to have multiple caches (at least 3) to help overcome performance issues in BDB (dncache, idlcache, entrycache).
Add more memory. Better, yet, ensure you are running the latest version of
OpenLDAP and switch to back‑mdb, which has significantly smaller memory requirements than back‑bdb/hdb.
Also there's nice utility named "monit", where you could check your memory (and alert yourself) like this:
check system .. if memory usage > 90% for 2 cycles then exec "/var/lib/monit/your_script.sh" if swap usage > 50% then exec "..."
Regards, Ulrich
‑‑Quanah
‑‑
Quanah Gibson‑Mount Product Architect Symas Corporation Packaged, certified, and supported LDAP solutions powered by OpenLDAP: http://www.symas.com
openldap-technical@openldap.org