[Date Prev][Date Next] [Chronological] [Thread] [Top]

Openldap out of memory problem



Hello, I have a problem in a production environment using Openldap 2.2.13. The
problem is, even establishing a reduced cachesize for Berkeley backend, my
openldap server starts to consume more and more memory until all RAM is
exhausted, causing server stop running (and sometimes backend corruption). I
have followed indications included in faq-o-matic to calculate an accurate
cache size for BDB backend (8MB), but the problem doesn't solves. At
beginning, openlaps starts with few memory (as configuration indicates) but
later more and more memory is consumed by the process. Here is the information
about my ldap server and service in order you can give a solution. I want that
mi slapd process doesn't cosume all fisical memory, basically.


Server:
 - RAM: 1GB
 - Swap: 1GB


Openldap:
 - version: 2.2.13
 - sizelimit: 5000


Backend:
  - Type: bdb
  - checkpoint: 512 30
  - cachesize: 5000


DB_CONFIG:
  - Cache (8MB): set_cachesize 0 8388608 1
  - Other options:
    set_lg_regionmax 262144
    set_lg_bsize 2097152
    set_lg_dir /var/lib/ldap/logs
    set_lg_max 52428800
    set_flags DB_LOG_AUTOREMOVE
  - dn2id.bdb size: 177MB
  - id2entry.bdb size: 555MB


Top information:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  SWAP COMMAND
12547 ldap      19   0  509m 139m  13m S  1.3 13.9   9:30.32 369m slapd


If I execute a pmap over slapd PID, there is a lot of RAM used by 'anon' piece
of memory. Any commentary will be very appreciated. Thanks.