[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: cachesize does not exceed 1000 entries
Folks,
I'm still having the same problem -- I'd <<really>> like to get this
working because it really seems like a waste to proxy and not cache.
I took Aaron's suggestion, querying and tracing the backend LDAP server
to see if its responses were limited to 1000 entries, but this was not
the case.
Some curiosities here:
1. If I use ldap as the database with overlay pcache, "cachesize" is
completely ignored and always defaults to 1000. However, the
"sizelimit" is adhered to but <not> if it exceeds 1000.
2. If I use meta as the database with overlay pcache, "cachesize" is
functional > 1000 entries but searches only work once -- the initial
search is cached but subsequent searches don't retrieve from cache but
just query the database endlessly.
Thanks,
Robert
The 2 configs I've tested:
---------------------------------------
database meta
suffix "dc=bnl,dc=gov"
rootdn "cn=Manager,dc=bnl,dc=gov"
rootpw {SSHA}stuffishere
uri "ldap://ldapserver/dc=bnl,dc=gov"
overlay pcache
proxycache bdb 10000 1 5000 3600
sizelimit 5000
cachesize 5000
proxyattrset 0 cn uid uidnumber gidnumber gecos description
homedirectory loginshell
proxytemplate (objectClass=) 0 3600
directory /var/lib/ldap
index objectClass eq,pres
#map attribute memberUid uniqueMember
-------------------------------------------
database ldap
suffix "dc=bnl,dc=gov"
rootdn "cn=Manager,dc=bnl,dc=gov"
rootpw {SSHA}stuffishere
uri "ldap://ldapserver"
overlay pcache
proxycache bdb 10000 1 5000 3600
proxyattrset 0 cn uid uidnumber gidnumber gecos description
homedirectory loginshell
proxytemplate (objectClass=) 0 3600
directory /var/lib/ldap
index objectClass eq,pres
sizelimit 5000
cachesize 5000
Aaron Richton wrote:
What is ">1000 entries?" My initial reading of this was "the first 1000
queries cache fine then it breaks." But I have a feeling that
> uri "ldap://ldapserver"
is implementing some sort of limit. Use heavier trace (slapd -d -1) to
see
exactly what the remote server is sending to see if you get an error code
back. I'm not sure if pcache forwards errors, but
> Aug 16 17:22:12 rldap04 slapd[4474]: conn=0 op=0 SEARCH RESULT tag=101
> err=0 nentries=1000 text=
sounds like you're not getting an error message. In that case I'd try
running some differing purposefully broad searches (against
ldap://ldapserver) from the command line and see if you
repeatedly/unexpectedly get 1000 entries.
Robert Petkus wrote:
Folks,
I'm running openldap version 2.3.4 configured to use an ldap database
with a proxycache backend. For whatever reason, I am unable to cache
> 1000 entries. I must be missing something so obvious. Any ideas?
Cheers,
Robert
slapd.conf:
database ldap
suffix "dc=bnl,dc=gov"
rootdn "cn=Manager,dc=bnl,dc=gov"
rootpw {SSHA}stuffishere
uri "ldap://ldapserver"
overlay pcache
proxycache bdb 100000 1 5000 3600
proxyattrset 0 cn uid uidnumber gidnumber gecos description
homedirectory loginshell
proxytemplate (objectClass=) 0 3600
directory /var/lib/ldap
index objectClass eq,pres
cachesize 2000
DB_CONFIG:
set_cachesize 0 536870912 1
slapd logs when doing a query:
ENTRY ADDED/MERGED, CACHED ENTRIES=997
Aug 16 17:22:12 rldap04 slapd[4474]: ENTRY ADDED/MERGED, CACHED
ENTRIES=998
Aug 16 17:22:12 rldap04 slapd[4474]: ENTRY ADDED/MERGED, CACHED
ENTRIES=999
Aug 16 17:22:12 rldap04 slapd[4474]: ENTRY ADDED/MERGED, CACHED
ENTRIES=1000
Aug 16 17:22:12 rldap04 slapd[4474]: STORED QUERIES = 1
Aug 16 17:22:12 rldap04 slapd[4474]: Added query expires at 1124230932
Aug 16 17:22:12 rldap04 slapd[4474]: Lock AQ index = 0
Aug 16 17:22:12 rldap04 slapd[4474]: TEMPLATE 0 QUERIES++ 1
Aug 16 17:22:12 rldap04 slapd[4474]: Unlock AQ index = 0 Aug 16
17:22:12 rldap04 slapd[4474]: Base of added query =
ou=people,dc=rcf,dc=bnl,dc=gov
Aug 16 17:22:12 rldap04 slapd[4474]: conn=0 op=0 SEARCH RESULT tag=101
err=0 nentries=1000 text=
Aug 16 17:22:12 rldap04 slapd[4474]: conn=0 op=1 UNBIND
Aug 16 17:22:12 rldap04 slapd[4474]: conn=0 fd=10 closed