Ultimate Member Extremely Slow
-
After running an import of users to Ultimate Member (total users: 220,221).
Ultimate member has slowed the website down to a crawl – it takes up to 20 seconds to load a page when the UM plugin is activated.
Are there any recommendations on how to get Ultimate Member to work with a large user base?
Or, does anyone have any recommendations on where to start debugging this type of slow down?
Thanks in advance!
-
Hi @coreywilson
Check the browser console log. Check the network tab and analyze which is taking longer time to load.
And I would recommend you to check out good host if your user base is bigger.
Thanks
The dedicated server it is on has 8 CPU & 16GB of Ram on a SSD
The network / console tab doesn’t say much other than the page takes 17s with PHP before loading the page
I am wondering if this is a memory leak or a bad query somewhere — possibly due to an import.
Does anything come to mind that might cause a slow down / long query loop in UM if something is set up improperly?
Thanks!
-
This reply was modified 5 years ago by
Corey.
Install Lighthouse as an extension to your Chrome browser and get a report of your performance
https://chrome.google.com/webstore/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk/related?hl=en
https://developers.google.com/web/tools/lighthouse#extension
You can also use the GTMetrix online tool to measure performance
I was able to install the plugin: Query Monitor which gave me some info on what query was causing the delay. It appears the query below is running on every single admin page and is now taking 9 seconds to complete. There are 5 million usermeta rows in the database currently. This query only seems to run on the admin side:
SELECT DISTINCT SQL_CALC_FOUND_ROWS wp_users.ID FROM wp_users INNER JOIN wp_usermeta ON ( wp_users.ID = wp_usermeta.user_id ) WHERE 1=1 AND ( ( wp_usermeta.meta_key = 'account_status' AND wp_usermeta.meta_value = 'awaiting_email_confirmation' ) OR ( wp_usermeta.meta_key = 'account_status' AND wp_usermeta.meta_value = 'awaiting_admin_review' ) ) ORDER BY user_login ASC LIMIT 0, 1Is there a reason this runs on every page and/or is it something that can be disabled or improved?
-
This reply was modified 5 years ago by
Corey.
Hi @coreywilson
Have you tried making UM the only active plugin and see if there’s a difference with the performance? Let’s see if there’s a plugin conflict issue.
Regards,
@champsupertramp I’ll give that a try in the morning! I have copied that query and run it directly in phpmyadmin though, and it still takes 8-9s to complete — so I don’t believe disabling other plugins will solve this.
I’ll give it a try though!
@champsupertramp confirming that Ultimate Member is running equally as slow without any other plugins installed.
There are 5 million user metafields in that table that the query needs to sort through.
Any thoughts? Can that query be disabled and/or is there any reason it would be running on every single page?
-
This reply was modified 5 years ago by
Corey.
Hi @coreywilson
Did you disable the user cache? Please go to WP Admin > Ultimate Member > Settings > Misc > see “Disable Cache User Profile”.
That query is for the red icon in the WP Admin > Users menu. It queries the total users who are awaiting admin review and email confirmation.
Regards,
@champsupertramp Just checked and that option is not checked, so it shouldn’t be disabled.
This was an import and merge from both a Drupal website and previous WordPress site. Maybe I need to warm the cache, is there any way to force it to cache each user?
Hi @coreywilson
Have you tried creating an Index to the usermeta table? Please see this doc:
https://css-tricks.com/finding-and-fixing-slow-wordpress-database-queries/#option-2-add-an-indexRegards,
@champsupertramp yep!
Keyname Unique Column Cardinality PRIMARY Yes umeta_id 4794868 user_id_2 Yes user_id 197093 meta_key 5135703 user_id No user_id 206846 meta_key No meta_key(191) 6400a unique (user_id, meta_key), an index on (user_id) and (meta_key)
-
This reply was modified 4 years, 12 months ago by
Corey.
@champsupertramp sorry, I meant it was already set up — no change in performance with the indexes.
SQL_CALC_FOUND_ROWS has a number of problems. First of all, it’s slow.
@missveronicatv Yep! But is there a way we can disable this SQL query all together on the admin page without hacking Ultimate Member?
-
This reply was modified 5 years ago by
The topic ‘Ultimate Member Extremely Slow’ is closed to new replies.