Hi,

i updatet my drupal page from Version 5 to 6.
Since that updated the module is unusable when it is connected to the profile module.

The page has about 3500 users, so the profile table is not that small but in Version 5 it was working fine.

Any ideas?

Comments

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have a copy of production in a dev/test environment? I would like you to try the 6.x-3.x-dev version. Also, you'll need to install the devel module and enable the options to see the slow queries. It may come down to needing an index.

dontgotanick’s picture

Hi,

i changed now to the dev version and installed the devel module and logged.

Path Memory (MB) ms (Total) Anonymous? # Queries Query ms
1 13.75 454 No 65 14
admin/reports 19.25 669 No 62 11
1 13.75 455 No 65 17
admin/settings/performance_logging 23.00 1589 No 87 29
admin/settings/performance_logging 12.50 710 No 26 10

The site endet up in an error page.

How can i create an index

regards dave

Anonymous’s picture

How did you copy your production? You may need to empty the cache via admin/settings/performance and you may need to empty the sessions table using a sql truncate query. Make sure you have the slow queries enabled on the devel module and you have the blocks enabled to show them.

dontgotanick’s picture

Hi i cleaered the cache and everything.

for some reason its not logging the queries

and when i load the advanced page it takes ages an then just shows up a blank page ....

Anonymous’s picture

WSOD is usually a sign of over running the memory limit.

Check the httpd log files and the php log files.
Check the watchdog table admin/reports/dblog or with phpmyadmin.

dontgotanick’s picture

Ok

the problem is that i cant look in the 2 log files cause the provider does not seperate them by customer and logs everything of all users.

I asked them now to allocate more memory and how to create an index.

And how stable is the dev oder alpha 1 module cause i need the possibility to search for people without roles and active accounts.

regards dave

dontgotanick’s picture

Hi got now the instruction how to increase the memory and the side loads now but it takes ages?

How can I create an Index can u tell me that?

regards

Anonymous’s picture

How can I create an Index can u tell me that?

Once you have determined which query is giving you the slow response please post it here so I can help determine which column. The column will be one of the ones in the WHERE clause or perhaps an ORDER BY clause. To create an index adhoc is easiest with phpMyAdmin assuming you're using MySql for your database.

dontgotanick’s picture

Hi they are telling me that there is nothing in that logs and its not slow with them?

thanks for your patience btw :)

I really dont know how i could contribute more information to you?

regards

Anonymous’s picture

I really dont know how i could contribute more information to you?

Ditto. Without more information I can't help you. There must be a slow query somewhere. Maybe try the 3.0-alpha1 version? You'll like the filter interface better anyway.

dontgotanick’s picture

Hi,

finally they told me what is the slow query.

| Id | User | Host | db | Command | Time | State | Info |
| 7991024 | confi14_admin | localhost | confi14_drupalvm | Query | 139 | Sending data | /* drupal_admin : pager_query */ SELECT COUNT(DISTINCT u.uid) FROM drupal_users u LEFT JOIN drupal_u |

regards

Anonymous’s picture

I've been away on vacation and just getting back to you on this. The query you post isn't a full query. There is more beyond the LEFT JOIN than just drupal_u.

dontgotanick’s picture

Hi they sended me now the query.

SELECT COUNT(DISTINCT u.uid) FROM drupal_users u LEFT JOIN drupal_users_roles ur ON u.uid = ur.uid

regards

Anonymous’s picture

That query has nothing to do with the Profile module, it doesn't touch the profile tables. Besides the uid column is the PRIMARY KEY for both the DRUPAL_USERS table and the DRUPAL_USERS_ROLES table. There is nothing you can do to speed that query.

dontgotanick’s picture

Weired cause its only slow when i activate profile fields ? Any idea why?

Anonymous’s picture

Not without the query that is causing the problem. It will be a query with a table that has PROFILE in its name. My guess is that the query is causing a full table scan of one or multiple tables for each user being displayed on the page.

dontgotanick’s picture

Hi thanks for your patience but they are not able to give me the proper query so we wont get whats causing that.

But thx anyway :)

jghyde’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Joe Here, co-maintainer.

Simple test for this: Disable the advuser module and see if the slowness continues. Otherwise, without any further input, I suggest this topic be closed.

Re-open if there is more info to diagnose.

Joe Hyde
Earnie's Brand New Co-Maintainer

Anonymous’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Well, slow down a bit. This is still unresolved.

dontgotanick’s picture

Hi, I'm back sorry for the time it took. But now I know the queries. which cause the problem.

If i run the query directly in phpmyadmin the first takes approximatly 4 minutes and the second 3. But if i start the advacned user module in drupal i get a White Screen of Death.

query1:
SELECT COUNT(DISTINCT u.uid) FROM drupal_users u LEFT JOIN drupal_users_roles ur ON u.uid = ur.uid LEFT JOIN drupal_profile_values profile_company ON profile_company.fid = 11 AND profile_company.uid = u.uid LEFT JOIN drupal_profile_values profile_vorname ON profile_vorname.fid = 1 AND profile_vorname.uid = u.uid LEFT JOIN drupal_profile_values profile_nachname ON profile_nachname.fid = 2 AND profile_nachname.uid = u.uid;

the result of this query is 3224 or sth like that

query2:
SELECT DISTINCT u.uid, u.name, u.mail, u.status, u.created, u.access FROM drupal_users u LEFT JOIN drupal_users_roles ur ON u.uid = ur.uid LEFT JOIN drupal_profile_values profile_company ON profile_company.fid = 11 AND profile_company.uid = u.uid LEFT JOIN drupal_profile_values profile_vorname ON profile_vorname.fid = 1 AND profile_vorname.uid = u.uid LEFT JOIN drupal_profile_values profile_nachname ON profile_nachname.fid = 2 AND profile_nachname.uid = u.uid ORDER BY u.created DESC LIMIT 0, 50;

i hope this information helps

regards dave

Anonymous’s picture

Component: Feature » Miscellaneous
Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

The count query is so that the pager knows how many pages that may be displayed. The second query gets the details for the page. Make sure your drupal_profile_values table has an index on columns fid and uid. Make sure your drupal_users and drupal_users_roles tables have an index on column uid. You may need to tune your SQL server for better performance; there are people on the support list that maybe able to help.

For help with your WSOD (white screen of death) go to drupal.org and enter wsod in the search criteria.

I don't have any further help for you. If someone has a better query then open a new issue as a bug report with a patch for review.

dontgotanick’s picture

index erstellen:

CREATE INDEX IDX_profile_fields ON drupal_profile_fields (fid)
CREATE INDEX IDX_profile_values ON drupal_profile_values (uid,fid)
CREATE INDEX IDX_users ON drupal_users(uid)
CREATE INDEX IDX_users_roles ON drupal_users_roles(uid)

thanks for all of your help this totaly fixed the problem

regards dave

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.