I'm trying to use the Enhanced User Admin block on my site, and seem to be having some trouble with it.
Whenever I try to browse or download the list of users, the entire system would lock-up for a significant period of time (5 mins, or more), and the rest of the moodle site becomes unresponsive. Top shows during this time, mysqld is taking up 100% of the CPU.
This occurs even if I'm accessing the site with lynx via SSH on the server itself.
When we had 400 users, I could still access the page eventually. Now that we have over 580 users, the page doesn't load up at all (I'm guessing it times out?).
I've enabled Developer Debugging Messages, and this is the display that I see:
---
Paging: PAGE 0, PERPAGE 50
- line 386 of blocks/useradmin/useradminlib.php: call to debugging()
- line 331 of blocks/useradmin/manage_user.php: call to useradmin_get_users_listing()
Paging: FROM 0, LIMIT 50
- line 387 of blocks/useradmin/useradminlib.php: call to debugging()
- line 331 of blocks/useradmin/manage_user.php: call to useradmin_get_users_listing()
SQL: SELECT u.*, mh.name AS mnethostname, mh.wwwroot AS mnethostwwwroot, (select data from mdl_user_info_data where fieldid = 7 AND userid = u.id) AS CZE, (select data from mdl_user_info_data where fieldid = 8 AND userid = u.id) AS address1, (select data from mdl_user_info_data where fieldid = 9 AND userid = u.id) AS address2, (select data from mdl_user_info_data where fieldid = 10 AND userid = u.id) AS address3, (select data from mdl_user_info_data where fieldid = 12 AND userid = u.id) AS state, (select data from mdl_user_info_data where fieldid = 11 AND userid = u.id) AS zip, (select data from mdl_user_info_data where fieldid = 2 AND userid = u.id) AS phone, (select data from mdl_user_info_data where fieldid = 4 AND userid = u.id) AS dobyear, (select data from mdl_user_info_data where fieldid = 5 AND userid = u.id) AS dobmonth, (select data from mdl_user_info_data where fieldid = 6 AND userid = u.id) AS dobdate, (select data from mdl_user_info_data where fieldid = 3 AND userid = u.id) AS tshirt, (select data from mdl_user_info_data where fieldid = 13 AND userid = u.id) AS gender, (select data from mdl_user_info_data where fieldid = 14 AND userid = u.id) AS forumname FROM mdl_user u, mdl_mnet_host mh WHERE (u.mnethostid = mh.id OR u.mnethostid IS NULL) AND u.deleted <> '1' AND u.username <> 'changeme' AND u.username <> 'guest' ORDER BY firstname ASC
- line 391 of blocks/useradmin/useradminlib.php: call to debugging()
- line 331 of blocks/useradmin/manage_user.php: call to useradmin_get_users_listing()
The query should return 584 record(s)
- line 399 of blocks/useradmin/useradminlib.php: call to debugging()
- line 331 of blocks/useradmin/manage_user.php: call to useradmin_get_users_listing()
The query should return 584 record(s)
- line 399 of blocks/useradmin/useradminlib.php: call to debugging()
- line 331 of blocks/useradmin/manage_user.php: call to useradmin_get_users_listing()
---
Other information about the site:
It's hosted on a Virtuozzo VPS, with WHM/Cpanel.
It has the following limits:
cpuunits: 8000 pcs (hard)
cpulimit: Disabled
slmmemorylimit: 805,306,368 bytes (soft)
slmmemorylimit: 2,685,354,560 bytes (hard)
(ie: 768Mb Guaranteed, 2.5Gb burst)
There aren't any QOS alerts.
---
What I really need is to be able to download the list of users (as a UTF-8 CSV) daily, with all our custom profile fields intact. To do so, I must first 'browse list of users', then 'download as a csv'. This is because custom profile fields aren't downloaded if I access 'download users to file' directly from the block; even when I choose 'yes' for 'include custom profile fields.
Any advice would be appreciated.
Thanks.