Uploaded image for project: 'LDAP'
  1. LDAP
  2. LDAP-7

First request of the day VERY slow for logged LDAP users

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 8.3
    • Authenticator
    • Ubuntu 10.04 LTS, Java(TM) SE Runtime Environment (build 1.6.0_24-b07), Tomcat 6.0.24, XWiki 3.0
    • LDAP, slow

    Description

      Everyday, the first request to our Intranet (XWiki 3.0) takes a long time (up to 5 minutes) if the user is logged in (we use LDAP authentication and the session was kept because the browser was open since yesterday). In my machine, while I was waiting for this long request, I tried opening another browser (without any session) and the page loads very fast. This problem also happens when I restart Tomcat and try to login for the first time.

      The problem is not with the LDAP server, because everybody can login in their MS Windows accounts and also everybody can login in another softwares which also uses LDAP.

      For reference, this is a piece of our xwiki.cfg file (with some obfuscated strings):

      xwiki.authentication.authclass=com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
      xwiki.authentication.ldap=1
      xwiki.authentication.ldap.server=xxxxxxxxxxx.xxx.xxx
      xwiki.authentication.ldap.port=389
      xwiki.authentication.ldap.base_DN=dc=XXX,dc=XXX
      xwiki.authentication.ldap.bind_DN=XXX\\{0}
      xwiki.authentication.ldap.bind_pass={1}
      xwiki.authentication.ldap.UID_attr=sAMAccountName
      xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
      xwiki.authentication.ldap.group_mapping=\
              XWiki.XWikiAllGroup=CN=Domain Users,CN=Users,DC=XXX,DC=XXX|\
              XWiki.XWikiAdminGroup=CN=Domain Admins,CN=Users,DC=XXX,DC=XXX|\
              ...
              ... (about 30+ group mappings)
              ...
      xwiki.users.initialGroups=XWiki.XWikiAllGroup
      xwiki.authentication.group.allgroupimplicit=1
      

      In my "catalina.out" file, I got a lot of these errors:

      2011-05-03 14:38:19,484 [http://10.100.13.27/wiki/bin/view/Intranet/] ERROR ldap.XWikiLDAPUtils             - Failed to remove a user from a group XWiki.xxx-xxx group: XWiki.XWikiAllGroup 
      java.lang.NullPointerException
      	at com.xpn.xwiki.doc.XWikiDocument.removeXObject(XWikiDocument.java:6671)
      	at com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.removeUserFromXWikiGroup(XWikiLDAPUtils.java:911)
      	at com.xpn.xwiki.plugin.ldap.XWikiLDAPUtils.syncGroupsMembership(XWikiLDAPUtils.java:708)
      	at com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.syncGroupsMembership(XWikiLDAPAuthServiceImpl.java:505)
      	at com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.syncGroupsMembership(XWikiLDAPAuthServiceImpl.java:487)
      	at com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.ldapAuthenticateInContext(XWikiLDAPAuthServiceImpl.java:438)
      	at com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.ldapAuthenticate(XWikiLDAPAuthServiceImpl.java:190)
      	at com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl.authenticate(XWikiLDAPAuthServiceImpl.java:137)
      	at com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator.authenticate(MyFormAuthenticator.java:284)
      	at com.xpn.xwiki.user.impl.xwiki.MyFormAuthenticator.processLogin(MyFormAuthenticator.java:157)
      	at com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl.checkAuth(XWikiAuthServiceImpl.java:244)
      	at com.xpn.xwiki.XWiki.checkAuth(XWiki.java:4079)
      	at com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl.checkAccess(XWikiRightServiceImpl.java:202)
      	at com.xpn.xwiki.XWiki.checkAccess(XWiki.java:4092)
      	at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:5293)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:191)
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:117)
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:129)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:218)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:865)
      	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
      	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
      	at java.lang.Thread.run(Thread.java:662)
      

      Using "kill -3", I could see the slow request waiting for something about LDAP (open catalina-thread_dump.out and search for "Intranet").

      Is there something I can do?

      Regards,

      Felipe Giotto.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              felipegiotto Felipe Giotto
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: