[13:07:25 CDT(-0500)] <sjungling> hey guys, since upgrading to 4.0.5 yesterday, our LDAP server has been having stability issues. our networking guys see that each application instance is creating 11+ connections to our LDAP server throughout the day. we have connection pooling enable for LDAP, but i was wondering if anyone else has had issues w/ LDAP on 4.0.x
[13:07:51 CDT(-0500)] <EricDalquist> what did you upgrade from
[13:08:02 CDT(-0500)] <EricDalquist> and no, we haven't but the ldap code hasn't really changed since 3.0
[13:08:13 CDT(-0500)] <sjungling> we came from 2.6
[13:08:47 CDT(-0500)] <EricDalquist> so my first guess would be persondirectory caching
[13:08:59 CDT(-0500)] <sjungling> yeah… we're not using it as far as I can tell
[13:09:02 CDT(-0500)] <EricDalquist> it was just pointed out that the default person dir config doesn't have any caching enabled
[13:09:03 CDT(-0500)] <sjungling> (caching that is)
[13:09:07 CDT(-0500)] <athena> yeah
[13:09:09 CDT(-0500)] <EricDalquist> and that would cause a lot of load on the attribute sources
[13:09:17 CDT(-0500)] <athena> i think we need to fix the default configurations
[13:09:20 CDT(-0500)] <athena> and get that documented
[13:09:29 CDT(-0500)] <athena> i bet a bunch of people are running w/o caching at this point
[13:09:41 CDT(-0500)] <EricDalquist> yeah
[13:09:45 CDT(-0500)] <EricDalquist> so here is a big example: https://wiki.jasig.org/download/attachments/27525146/personDirectoryContext.xml?version=1&modificationDate=1256668239118
[13:10:14 CDT(-0500)] <EricDalquist> and I created https://issues.jasig.org/browse/UP-3555 as a reminder
[13:10:26 CDT(-0500)] <EricDalquist> maybe I can get to that this week
[13:10:33 CDT(-0500)] <EricDalquist> I will for sure before 4.0.7
[13:10:43 CDT(-0500)] <EricDalquist> and we can make an announcement about it too
[13:11:52 CDT(-0500)] <sjungling> sweet. i'll start converting over my config to use caching
[13:12:06 CDT(-0500)] <EricDalquist> you'll need to add the corresponding caches in ehcache.xml
[13:12:17 CDT(-0500)] <EricDalquist> in general even short timeouts are valuable
[13:12:24 CDT(-0500)] <EricDalquist> like 5 min
[13:12:36 CDT(-0500)] <EricDalquist> time out == TTL
[13:13:19 CDT(-0500)] <sjungling> there an example of how to mod ehcache.xml?
[13:13:50 CDT(-0500)] <EricDalquist> it is pretty straight forward, just copy one of the <cache> elements and change the name/size/ttl to what you need
[13:14:30 CDT(-0500)] <sjungling> gotcha
[13:47:06 CDT(-0500)] <sjungling> took a stab at implementing caching in personDirectoryContext.xml (https://gist.github.com/c13e7049cb3685b17abb) but am seeing the error below when deploying.
[13:47:06 CDT(-0500)] <sjungling> "[org.jasig.portal.utils.cache.PersonDirectoryCacheKeyGenerator]: Bean property 'useAllAttributes' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?"
[13:55:32 CDT(-0500)] <EricDalquist> just remove that
[13:55:38 CDT(-0500)] <EricDalquist> that <property>
[13:55:44 CDT(-0500)] <EricDalquist> I think the example needs updating
[13:56:51 CDT(-0500)] <sjungling> kk. so the userAttributeCacheKeyGenerator will just have ignoreEmptyAttributes as the only prop?
[13:57:30 CDT(-0500)] <EricDalquist> yes
[13:57:31 CDT(-0500)] <EricDalquist> <bean id="userAttributeCacheKeyGenerator" class="org.jasig.portal.utils.cache.PersonDirectoryCacheKeyGenerator">
[13:57:31 CDT(-0500)] <EricDalquist> <property name="ignoreEmptyAttributes" value="true" />
[13:57:31 CDT(-0500)] <EricDalquist> </bean>