Email notifications not being sent, getting error pointing to buddypress

Hi, our users aren't receiving notifications, and password reset emails 'appear' to be going through, but aren't received.

I'm seeing this incredibly long error in my logs:

[Thu Jan 28 20:35:52.159380 2016] [:error] [pid 10261] [client 66.249.79.68:36494] KILLED QUERY (16595 characters long generated in /nas/content/live/sboardsite/wp-content/plugins/buddypress/bp-core/classes/class-bp-user-query.php:567): SELECT wp_users.ID,wp_users.user_login,wp_users.user_pass,wp_users.user_nicename,wp_users.user_email,wp_users.user_url,wp_users.user_registered,wp_users.user_activation_key,wp_users.user_status,wp_users.display_name FROM wp_users WHERE 1=1 AND wp_users.ID IN (741,3212,2935,805,777,429,672,44,2223,2318,3602,3363,1534,1330,3739,1977,373,904,2809,539,1654,537,1899,2317,3467,2796,585,1939,3693,2113,3373,1423,1348,3342,564,1353,1704,572,1715,2797,1430,3340,2293,3008 ....... (I cut it off here, it goes on and on.)

I see the problem is with buddypress, but I have no idea where to go from here. Does this error log provide you with any clue where I should begin?

  • Vaughan

    Hi Marla,

    Hope you're well?

    Are you hosted on wpengine by any chance? The only info I can find related to that kind of log is with wpengine hosting. https://wpengine.com/support/troubleshoot-wordpress-wp-engine-error-log/#killedquery

    It might be the cause of the reset emails, but i'm almost sure it is unrelated.

    Can you grant support access sowe can take a look?

    But this long query,I think you should report this also to buddypress developers too,as a long query like that is highly inefficient & needs some optimization.

    You can find buddypress support here.https://buddypress.org/support/

    If you are using wpengine hosting, can you try adding the following line to your wp-config.php

    define('WPE_GOVERNOR', false);

    That should prevent the query being killed I think.

    Hope this helps

  • Marla

    A developer we have working with us has been working with the folks at WPEngine where the site is hosted to figure this out. The issue is that users get an "invalid key" error when they click on the email that is sent. We're pretty sure this is a caching issue.

    One day last week we got WPEngine to add an exception to the Varnish cache for the cookie being set for password reset, and that seemed to work for that day. But that evening they did an automated update to WP core and since then (perhaps coincidentally) it has no longer worked. WPEngine assures us that the Varnish exceptions are the same and have provided us with a list of paths (see attached image) and cookies (see below) that are excluded:

    set $is_not_wp_admin 0;
    if ( $uri ~* "^/(?!wp-admin)" ) {
      set $is_not_wp_admin 1;
    }
    
    set $got_my_cookie 0;
    if ( $http_cookie ~* "AppPresser_Appp" ) {
      set $got_my_cookie 1;
    }
    
    set $got_both_cookie_vars "$is_not_wp_admin:$got_my_cookie";
    if ( $got_both_cookie_vars = "1:1" ) {
      add_header X-Type "nocachecookie";
    
    }
    
    set $is_not_wp_admin 0;
    if ( $uri ~* "^/(?!wp-admin)" ) {
      set $is_not_wp_admin 1;
    }
    
    set $got_my_cookie 0;
    if ( $http_cookie ~* "wp-reset-" ) {
      set $got_my_cookie 1;
    }
    
    set $got_both_cookie_vars "$is_not_wp_admin:$got_my_cookie";
    if ( $got_both_cookie_vars = "1:1" ) {
      add_header X-Type "nocachecookie";
    
    }

    Can you take a look and see if you can figure this out? We're stumped at this point.

    Thanks!

  • Vaughan

    Hi Marla,

    I've just been testing this on your site, I registered a new account first. The new account confirmation email was received ok.

    I clicked the activation link in the email and the account activated fine.

    I then went throughthe reset password function.

    I received the reset password email, I clicked the link in the email and it took me to the reset password screen ok, and password was changed fine.

    Am I doing something different to you? or is this now working ok?

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.