activity stream ends in neverending sql query and cannot be displayed
-
Hi,
I run a site with wordpress 3.9 and buddypress 2.0.1 and I tried to update to the latest wordpress and buddypress versions.
Upgrading all plugins and wordpress 4.0.1 works fine except buddypress.
After an upgrade to the latest version I cannot access the activity stream.No site is loaded. Mysqld process procudes massive server load.
Taking a look into the mysql process list shows a query that will not end..
The query that makes problems is
SELECT DISTINCT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name FROM wp_bp_activity a LEFT JOIN wp_users u ON a.user_id = u.ID LEFT JOIN ( SELECT *, max( privacy ) as max_privacy from wp_rt_rtm_media group by activity_id ) m ON ( a.id = m.activity_id AND m.blog_id = ‘1’ ) WHERE a.is_spam = 0 AND a.component IN ( ‘activity’,’bbpress’,’blogs’,’events-manager’,’group’,’groups’ ) AND a.hide_sitewide = 0 AND a.type NOT IN (‘activity_comment’) AND (NOT EXISTS (SELECT m.activity_id FROM wp_bp_activity_meta m WHERE m.meta_key=’rtmedia_privacy’ AND m.activity_id=a.id) OR ( (m.max_privacy is NULL OR m.max_privacy <= 0) OR ((m.max_privacy=20) OR (a.user_id=3230 AND m.max_privacy >= 40) OR (m.max_privacy=40 AND a.user_id IN (‘30430′,’23231′,’35052′,’34805′,’19524′,’28610′,’25653′,’34715′,’34345′,’25880′,’33050′,’32699′,’32755′,’31379′,’24509′,’10341′,’14430′,’4593′,’13128′,’26351′,’18474′,’28496′,’13855′,’27331′,’11156′,’9756′,’7534′,’16263′,’26660′,’24326′,’12070′,’19294′,’8530′,’10345′,’4243′,’4863′,’603′,’7666′,’4013′,’10128′,’6354′,’26156′,’7712′,’3656′,’8677′,’13083′,’15058′,’3685′,’4469′,’10959′,’3543′,’5078′,’8588′,’18269′,’7399′,’4375′,’13787’))) ) ) ORDER BY a.date_recorded DESC LIMIT 0, 20
I do not have any problems with buddypress 2.0.1 that runs actually.
bp_acticity has about 110.000 items at my site.
Have there been any changes in the sql statements?
Is there a bug?Indexes of the bp_acticity table:
mysql> SHOW INDEXES FROM wp_bp_activity;
+—————-+————+——————-+————–+——————-+———–+————-+———-+——–+——+————+———+—————+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+—————-+————+——————-+————–+——————-+———–+————-+———-+——–+——+————+———+—————+
| wp_bp_activity | 0 | PRIMARY | 1 | id | A | 108581 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | date_recorded | 1 | date_recorded | A | 108581 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | user_id | 1 | user_id | A | 12064 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | item_id | 1 | item_id | A | 108581 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | secondary_item_id | 1 | secondary_item_id | A | 36193 | NULL | NULL | YES | BTREE | | |
| wp_bp_activity | 1 | component | 1 | component | A | 10 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | type | 1 | type | A | 16 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | mptt_left | 1 | mptt_left | A | 48 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | mptt_right | 1 | mptt_right | A | 55 | NULL | NULL | | BTREE | | |
| wp_bp_activity | 1 | hide_sitewide | 1 | hide_sitewide | A | 1 | NULL | NULL | YES | BTREE | | |
| wp_bp_activity | 1 | is_spam | 1 | is_spam | A | 1 | NULL | NULL | | BTREE | | |
+—————-+————+——————-+————–+——————-+———–+————-+———-+——–+——+————+———+—————+Does anybody have some hints where I can search for a solution for my problems?
Are there similar problems known with the latest buddypress plugin?
Thanks for your help
Florian
- The topic ‘activity stream ends in neverending sql query and cannot be displayed’ is closed to new replies.