• Resolved dabeebe2000

    (@dabeebe2000)


    I am on wordpress 4.1.1 and BuddyPress 2.2.1. I recently moved my site to WP-Engine and had a variety of issues with email alerts across the board, but now that I have setup mailgun for transactional email everything is working, EXCEPT for the daily updates. The other live updates appear to work fine. Any advice would be greatly appreciated. This is core functionality, so if I can’t get it to work I have to move back and that would be frustrating because other that this issue everything else is working better.

    I assume BuddyPress 2.2.2 won’t help this, but I am pretty sure all my other plugins would work so I can do this if necessary. Here is the main log that I see that points to an issue, but there are other concerning ones.

    You can see the killed query in this one:

    [Sun Apr 12 05:52:13 2015] [error] [client 50.170.199.79] KILLED QUERY (65277 characters long generated in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php:115): \n\t\tSELECT id, type, action, content, primary_link, secondary_item_id, date_recorded\n\t\t\tFROM wp_bp_activity\n\t\t\tWHERE id IN

    And then some others I am regularly seeing:

    [Sun Apr 12 05:52:13 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in isset or empty in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 89, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    [Sun Apr 12 05:52:13 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 90, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    [Sun Apr 12 05:52:13 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in isset or empty in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 89, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    [Sun Apr 12 05:52:13 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 90, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    https://wordpress.org/plugins/buddypress-group-email-subscription/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter dabeebe2000

    (@dabeebe2000)

    Below is what WPENGINE told me, but the more I look into it the more I think this has to do with some default setting on that I can change on the SQL side. The main reason is it takes literally 10 seconds for the “SQL reaper” to kill the query, which seems really quick if it was that big of a deal. Anyway, any help would be great appreciated.

    Thanks for reaching out to support! I understand you’re having some difficulties with your email plugin sending out notifications and I’ll be glad to help out! On our platform we have mechanisms that will regulate the server from being overwhelmed with requests or tasks. This ensures that our servers performance for your site and other clients are on point at all times. I’m afraid sometimes that this can cause issues with taxing scripts that require a lot of work to fire off correctly. The one that’s playing a role here is our MySQL reaper that will kill queries that take a long time to process so it does not saturate MySQL connections on the box if there are many long running queries that can impede database performance.

    What may be the option here would be to see if there is a way for the plugin to do many, smaller batches, of the request instead of all of them at once. This way the task/process will not get killed while still getting completed. I’m not too familiar with that exact plugin however there are some mail subscription plugins that do handle large list size in smaller batches. I would advise in reaching out to the plugin developer to see if they’re able to provide some insight in segmenting the size of notifications being sent out.

    Thread Starter dabeebe2000

    (@dabeebe2000)

    Thankfully WP-Engine put an exception for my account and now the query actually completes. What surprises me is how fast it is, yet they were killing it, even though took 10 seconds to run.

    Now those I cannot get those emails to send. I have looked at the cron jobs, and run manually, so that doesn’t seem to be it. All other emails are sending through the plugin. I have it all setup to go through a transaction email gateway, which from all indication is working great.

    My main concern is my error log is full of the errors below, and I can’t tell if they are related to my issue. I have not tried a mail queue, mostly because I can’t seem to find one that seems like it has good reviews and is stable. Any thoughts would be greatly appreciated. Thanks, David

    [Sun Apr 12 21:04:22 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in isset or empty in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 89, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    [Sun Apr 12 21:04:22 2015] [error] [client 50.170.199.79] PHP Warning: Illegal offset type in /nas/wp/www/cluster-3146/denverth/wp-content/plugins/buddypress-group-email-subscription/bp-activity-subscription-digest.php on line 90, referer: http://denvertherapistsnetwork.com/wp-admin/network/admin.php?page=ass_admin_options

    Thread Starter dabeebe2000

    (@dabeebe2000)

    Okay, just wanted to give an update. I worked with WPENGINE and we did all sorts of testing, and it seems that the lines 89/90 PHP error is the only thing that is likely to be causing this issue.

    This is the code:
    `if ( ! isset( $all_activity_items[$sid] ) && ! empty( $sid ) ) {
    $all_activity_items[$sid] = 1;`

    The only thing I can think of is this is related to php or MySQL, but at this point I have no idea. I am on MySQL 5.5.42 and PHP 5.3.

    I can upgrade to PHP 5.5 if I want. I do not know the version of the server I moved from (although I think I recall 5.4.x), and that server is gone so I can’t check.

    So any help would be great. All other mail is sending fine using this plugin. Thanks, David

    Plugin Author Boone Gorges

    (@boonebgorges)

    dabeebe2000 – Sorry to hear you’re having troubles. You are probably right that the failure at line 89 is what’s causing digests not to be sent, since a failure here would trigger the “no activity IDs? stop now!” bail condition just below. That said, it’s not immediately obvious to me why you’re getting the error. As a way of debugging, you might have a look at the nested foreach loops starting at line 83 of that file, and var_dump() each of the values before looping over them: var_dump( $user_subscriptions ), var_dump( $subs ), var_dump( $group_subs ), var_dump( $sub_ids ). I’m guessing that $group_subs is somehow corrupt.

    Thread Starter dabeebe2000

    (@dabeebe2000)

    Thanks Boone! Last night we created a clone of the site and actually ended up not using because we were doing other work. This morning the email generated from that cloned website, so that gives us some great data to go off of. More and more this looks like a configuration problem that somehow occurred with the migration but a cloned site doesn’t copy, so we are digging into that now. Thanks…

    Thread Starter dabeebe2000

    (@dabeebe2000)

    Okay, we swore we looked at this last night, but all of this was related to object caching on the site. I went back and checked again and it was on, and strangely it appears WP-Engine has two places that this can be turned on from, so I checked one place, saw was on, turned off and tested and didn’t work. And then a little bit later saw the second place, and turned off and it worked this time.

    Thread Starter dabeebe2000

    (@dabeebe2000)

    And just for those that run into this with WP-Engine – object caching can be done on the user portal and the wpengine dashboard portal (inside wp-admin). It was almost like these settings conflicted with each other somehow really…

    Plugin Author Boone Gorges

    (@boonebgorges)

    Thanks for the update. Do you have any more details about how object caching is interfering with digests? It shouldn’t be, and in fact is not on several of my own clients’ sites.

    Plugin Author r-a-y

    (@r-a-y)

    Do you have any more details about how object caching is interfering with digests?

    Reminds me of this topic:
    https://buddypress.org/support/topic/request-for-way-to-disable-caching-of-xprofile-data-for-get_all_for_user/

    Could be related to this:
    https://github.com/boonebgorges/buddypress-group-email-subscription/blob/master/bp-activity-subscription-digest.php#L334

    The cache setting here might be bloating the memory. Could try removing it.

    In general, the digest code in GES isn’t the greatest and needs refactoring for sites with large user installs and active activity. It uses multiple foreach loops (and also nested foreach loops). With large datasets, this can eat up memory fast.

    Thread Starter dabeebe2000

    (@dabeebe2000)

    Sorry, just saw these posts as were going in my promotions folder.

    But I don’t have any additional details. I found an article somewhere talking about problems with object cache and I believe BuddyPress in general, and then someone on WPMU recommended to look at that as well as they had heard of general issues with it and provided a link (but that link really had no useful information). All I can say is with regard to how WP-Engine implements it this was 100% the cause. It has been working perfectly ever since it got turned off.

    If you ever want me to test new code to see if it fixes it just let me know – happy to help.

    Thanks, David

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Moved to WP-Engine and Daily Notfication Stopped Working’ is closed to new replies.