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

Re: cachesize does not exceed 1000 entries

Pierangelo Masarati wrote:

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.

Do you mean that the proxies, without pcache, return more that 1000 entries?

I suggest you try and directly query the remote database with ldapsearch using a query that matches the proxy attrset and the proxytemplate; check if you hit any limit; moreover, on the remote server, with loglevel set to "-d 4", look for a group of lines of the form
SRCH "dc=example,dc=com" 2 0 0 0 0
filter: (objectClass=inetOrgPerson)
attrs: cn uid uidnumber gidnumber gecos description homedirectory loginshell
If anly limit was requested by the client (e.g., in the next example, SIZELIMIT and TIMELIMIT were set to 1000 and 3600 in ldaprc), you'll see
SRCH "dc=telco,dc=com" 2 0 1000 3600 0
filter: (objectClass=inetOrgPerson)
attrs: cn uid uidnumber gidnumber gecos description homedirectory loginshell
If you see any sizelimit appear in the request, then it's your client picking them up somewhere in some ldap.conf, ldaprc or .ldaprc file in the default location, in your home or in your working directory.

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.

I note that, as of 2.2, "sizelimit" is a wrapper around the "limits" command, which is per-database, while "sizelimit" should be global, so I suspect you should place "sizelimit" before any database statement; I need to check.

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.

I Note that you shouldn't use back-meta if you're proxying a single
target; however, the behavior you see shouldn't occur. I'll try to
reproduce it and, in case, you should file an ITS. I'll be back.

I couldn't reprouce the issue with HEAD code using back-meta; a database with 2000 entries matching the proxytemplate were successfully cached during the first query, and subsequently returned from the cache. I suggest you upgrade to check if the problem persists. In case, please file an ITS with detailed instructions to reproduce it.


SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497