Mailing List Archive

LDAP and cache
Hello,

I'm running davical Version: 1.1.3.1-1 on Debian jessie with
ldap authentication. It works almost perfect, but the ldap server
doesn't work reliable. It is a Directory Server on MacOS 10.8.5
(Mountain Lion). CPU load is high and the memory blocks the
server until the server crashes.
I'm registering many connections from the host running davical
to the ldap server if someone opens a calendar. Is there any
possibility to cache the user, password and group information
like nscd on a linux system?

Thank you.
Petra Humann
Re: LDAP and cache [ In reply to ]
Hi Petra,

you can install & configure memcached + php5-memcached, and add the following option into DAViCal config:

$c->memcache_servers = array('localhost,11211');


Note: DAViCal caches not only principals but also privileges, and due to bug in DAViCal you MUST restart memcached each time you change any principal privileges (otherwise the "old" cached privileges are used)


JM


p.s.: instead of using memcached try to properly configure your OpenLDAP (there are a ton of caching options in "cn=config", e.g.: olcDbIDLcacheSize, olcDbConfig /set_cachesize/, ...), or install the current bug-free version of OpenLDAP on a separate Linux/Unix server


JM





> On 12 Mar 2015, at 11:21, Petra Humann <humann@tcs.inf.tu-dresden.de> wrote:
>
> Hello,
>
> I'm running davical Version: 1.1.3.1-1 on Debian jessie with
> ldap authentication. It works almost perfect, but the ldap server
> doesn't work reliable. It is a Directory Server on MacOS 10.8.5
> (Mountain Lion). CPU load is high and the memory blocks the
> server until the server crashes.
> I'm registering many connections from the host running davical
> to the ldap server if someone opens a calendar. Is there any
> possibility to cache the user, password and group information
> like nscd on a linux system?
>
> Thank you.
> Petra Humann
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/_______________________________________________
> Davical-general mailing list
> Davical-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/davical-general
Re: LDAP and cache [ In reply to ]
Hi Ján,

Am 13.03.2015 um 11:44 schrieb Ján Máté <jan.mate@inf-it.com>:

> you can install & configure memcached + php5-memcached, and add the following option into DAViCal config:
>
> $c->memcache_servers = array('localhost,11211');

thank you very much, that helps a lot. But slapd is not reliable yet.

> ...
> p.s.: instead of using memcached try to properly configure your OpenLDAP (there are a ton of caching options in "cn=config", e.g.: olcDbIDLcacheSize, olcDbConfig /set_cachesize/, ...),
>
I checked this and this seems okay.

> or install the current bug-free version of OpenLDAP on a separate Linux/Unix server

;-) It is not my decision.
Apple hasn't a newer version of slapd yet. The problem may be similar to
https://discussions.apple.com/thread/4270550
php_ldap does not support persistent connections. So every query from
davical to the ldap server opens a connection, get information and closes
the connection.

In the meanwhile I installed http://mmonit.com/monit/ from Homebrew to monitor the memory usage of slapd.
If slapd seems to block the server, monit restarts the process.

But I will stay tuned.

Regards.
Petra Humann


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general