core icon indicating copy to clipboard operation
core copied to clipboard

LDAP Performance issue (User Page loads slowly/hangs)

Open sbelov1 opened this issue 11 years ago • 19 comments

Build: 7.0.4 stable - our latest virtual appliance which supposedly contains all the LDAP patches. Description: One of my prospects is experiencing issues with an OpenLDAP performance when navigating the Users screen. The user search takes forever to load if it ever loads (only 1800 users in the database). When he navigates away from the Users screen web server hangs forcing him to restart the apache service. Logs seem to refer to an LDAP login filter not containing uid, I'll take a closer look into it on the next call, however none of the openLDAP users seem to have problems logging in, so not sure how its related. @blizzz has the logs. Here's a the latest excerpt from it:

ven!","level":2,"time":"2015-01-06T20:10:50+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:50+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:10:50+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:50+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:10:51+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:51+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:10:51+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:51+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:10:55+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:55+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:10:55+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:10:55+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:00+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:06+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:06+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): No LDAP Login Filter given!","level":2,"time":"2015-01-06T20:11:06+00:00"} {"app":"user_ldap","message":"Configuration Error (prefix ): login filter does not contain %uid place holder.","level":2,"time":"2015-01-06T20:11:06+00:00"} {"app":"PHP","message":"ldap_control_paged_result_response(): Result is: No such object (32) at /var/www/html/owncloud/apps/user_ldap/lib/ldap.php#58","level":3,"time":"2015-01-06T20:12:18+00:00"} {"app":"PHP","message":"ldap_control_paged_result_response(): Result is: No such object (32) at /var/www/html/owncloud/apps/user_ldap/lib/ldap.php#58","level":3,"time":"2015-01-06T20:12:36+00:00"} {"app":"PHP","message":"ldap_control_paged_result_response(): Result is: No such object (32) at /var/www/html/owncloud/apps/user_ldap/lib/ldap.php#58","level":3,"time":"2015-01-06T20:12:38+00:00"}

sbelov1 avatar Jan 07 '15 14:01 sbelov1

@blizzz

karlitschek avatar Jan 07 '15 14:01 karlitschek

@sbelov1 Thanks a lot for reporting issues back to us!

We need some more information to properly support you with your issue!

Can I ask you to follow our guidelines for submitting bugs as described here: https://github.com/owncloud/core/blob/master/CONTRIBUTING.md

Thanks a lot!

DeepDiver1975 avatar Jan 07 '15 14:01 DeepDiver1975

our latest virtual appliance

is a too little technical specification

DeepDiver1975 avatar Jan 07 '15 14:01 DeepDiver1975

Sure. Here's the missing info: php version is 5.4.36 Web Server: apache db: MySQL OC virtual appliance running the latest public build 7.0.4 In addition to app that enabled by default, these apps are also present: LDAP backend and WND No external storage app used No encryption is used Browser: Chrome

sbelov1 avatar Jan 07 '15 16:01 sbelov1

From the log you can already see that there are configuration issues.

Please get the whole config: ./occ ldap:show-config

blizzz avatar Jan 07 '15 17:01 blizzz

It is a little bit odd that "No such object (32)" (meaning an entry you attempt to read does not exist) was returned with ldap_control_paged_result_response which is just for controling Paged Search.

@sbelov1 can you additionally ask the one to run this script? https://gist.github.com/blizzz/0b57f85c122dedf34da8

Basic LDAP parameters need to be passed, running it without parameters will show you what to put where.

blizzz avatar Jan 07 '15 17:01 blizzz

@blizzz would you please provide some instructions on how to run this script and where needs to be placed?

sbelov1 avatar Jan 07 '15 17:01 sbelov1

@sbelov1

  1. save the script (https://gist.github.com/blizzz/0b57f85c122dedf34da8#file-serversupportspagedresults-php) as serversupportspagedresults.php whereever you want, but on the machine running ownCloud
  2. call it via php -f serversupportspagedresults.php "$HOST" "$PORT" "$BASE" "$USERDN" "$PASSWORD" but before, replace the placeholders with the LDAP configuration as used in ownCloud (leave out $USERDN and $PASSWORD if anonymous bind is used)

blizzz avatar Jan 07 '15 21:01 blizzz

@blizzz ok, thanks. Run it on my system as a test and now having my prospect run this script. Will let you know..

sbelov1 avatar Jan 08 '15 16:01 sbelov1

@blizzz

Results: Server supports Paged Results

sbelov1 avatar Jan 08 '15 17:01 sbelov1

and the config?

blizzz avatar Jan 08 '15 17:01 blizzz

@blizzz Oh, I guess you're referring to ./occ ldap:show-config? Let me ask him to run that as well.

sbelov1 avatar Jan 08 '15 17:01 sbelov1

@blizzz Check your email for the output of the config.

sbelov1 avatar Jan 08 '15 19:01 sbelov1

@sbelov1

  • Does login also take long for LDAP users?
  • did serversupportspagedresults.php take long to run?
  • run ./occ ldap:search e. How long does it take? (You can also use time ./occ ldap:search e, then the time will be shown afterwards).
  • The (uid=*) Part in the User Filter is unnecessary as uid is configured to be the display name, too. Try to remove it and see whether this helps.

blizzz avatar Jan 09 '15 09:01 blizzz

@blizzz thanks. Having the prospects run those commands. Will update you as soon as I hear back.

sbelov1 avatar Jan 09 '15 15:01 sbelov1

@sbelov1 um, was this solved?

blizzz avatar Jun 16 '15 09:06 blizzz

@sbelov1 was this resolved from the prospect perspective? Just need to understand if you need anything additional here?

bboule avatar Jun 16 '15 13:06 bboule

@blizzz @bboule I haven't seen this issue come up anymore, so I'm closing the ticket. Thanks guys.

sbelov1 avatar Jun 16 '15 13:06 sbelov1

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Aug 05 '19 09:08 lock[bot]