Hi Quanah,

I did revert all my changes of openldap and try increasing the property from slapd.ldif using olcDBMaxSize.

below are my observations, if i try to set the value from property, i dont understand from where the value 1406945XXXXXX and getting set.

Please check the details mentioned.

1) olcDbMaxSize: 10485760

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 140694549168128
  Page size: 4096
  Max pages: 34349255168
  Number of pages used: 2
  Last transaction ID: 0
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)

>slapd.exe -T add -F ..\slapd.d -l backupContent.ldif
5e37a371 mdb_db_open: database "o=abc.net" cannot be opened: ⁿ    (87). Restore from backup!
5e37a371 backend_startup_one (type=mdb, suffix="o=abc.net"): bi_db_open failed! (87)
slap_startup failed


2) olcDbMaxSize: 1048576

>slapd.exe -T add -F ..\slapd.d -l backupContent.ldif
5e37a5ef mdb_db_open: database "o=abc.net" cannot be opened: ⁿ    (87). Restore from backup!
5e37a5ef backend_startup_one (type=mdb, suffix="o=abc.net"): bi_db_open failed! (87)
slap_startup failed

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 140694539730944
  Page size: 4096
  Max pages: 34349252864
  Number of pages used: 2
  Last transaction ID: 0
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)


3) olcDbMaxSize: 1024

>slapd.exe -T add -F ..\slapd.d -l backupContent.ldif
5e37a7fd mdb_db_open: database "o=abc.net" cannot be opened: ⁿ    (87). Restore from backup!
5e37a7fd backend_startup_one (type=mdb, suffix="o=abc.net"): bi_db_open failed! (87)
slap_startup failed

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 140694538683392
  Page size: 4096
  Max pages: 34349252608
  Number of pages used: 2
  Last transaction ID: 0
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)


5) olcDbMaxSize 10

>slapd.exe -T add -F ..\slapd.d -l backupContent.ldif
5e37a92b mdb_db_open: database "o=abc.net" cannot be opened: ⁿ    (87). Restore from backup!
5e37a92b backend_startup_one (type=mdb, suffix="o=abc.net"): bi_db_open failed! (87)
slap_startup failed

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 140694538682378
  Page size: 4096
  Max pages: 34349252608
  Number of pages used: 2
  Last transaction ID: 0
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)


6) olcDbMaxSize 1


>slapd.exe -T add -F ..\slapd.d -l backupContent.ldif
5e37a92b mdb_db_open: database "o=abc.net" cannot be opened: ⁿ    (87). Restore from backup!
5e37a92b backend_startup_one (type=mdb, suffix="o=abc.net"): bi_db_open failed! (87)
slap_startup failed

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 140694538682369
  Page size: 4096
  Max pages: 34349252608
  Number of pages used: 2
  Last transaction ID: 0
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)

7) olcDbMaxSize not set

>mdb_stat.exe -rne "C:\testMaxSize2\mdb\data.mdb"
Environment Info
  Map address: 0000000000000000
  Map size: 1048576
  Page size: 4096
  Max pages: 256
  Number of pages used: 254
  Last transaction ID: 104
  Max readers: 126
  Number of readers used: 0
Reader Table Status
(no active readers)






On Fri, Jan 31, 2020 at 12:56 PM Quanah Gibson-Mount <quanah@symas.com> wrote:


--On Friday, January 31, 2020 12:09 PM +0530 Vijay Kumar
<pasumarthivijaykumar@gmail.com> wrote:

>
>
>
>
> I could see some stats from mdb-stat tool as mentioned below,
>
>
> mdb_stat.exe -rne "C:\openldap\mdb\data.mdb"
> Environment Info
>   Map address: 0000000000000000
>   Map size: 268435456   (we have set the value
> as ‭104,857,600,000,000‬ in mdb.c and back_mdb.h files, but it has
> taken only 256 MB, not sure why?)


You should be making NO CHANGES to the source code *AT ALL*.  The *ONLY*
thing you should be doing is setting a maxsize parameter correctly in the
slapd configuration.  PERIOD.  I don't know how to be any clearer than this.

Regards,
Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>


--
Thanks & Regards,
 
Vijay Kumar
+91-94944 44009