10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.25k stars 313 forks source link

ElasticPress Incompatible with WooCommerce Subscriptions #1026

Closed KyleWLawrence closed 4 years ago

KyleWLawrence commented 6 years ago

Have you searched for similar issues before submitting this one? Yes

Is this a bug, question or feature request? Bug

Describe the issue you encountered: ElasticPress appears to be incompatible with WooCommerce Subscriptions. Aside from receiving sync errors (not sure if that is an issue with WC Subs or something else), the main things is that the subscriptions do not charge the donations on renewal. I have experience this error with PHP Caching plugins, so I believe it has something to do the way the data gets updated in certain places.

Current WordPress version: 4.9.4

Current ElasticPress version: 2.4.1

Current Elasticsearch version: 4.5

Where do you host your Elasticsearch server: Hosted on same Cloudways server. 2GB Vulture.

Other plugins installed (WooCommerce, Simple Redirect Manager, etc..): Broken Link Checker Custom Upload Dir Download Attachments Duplicate Post Easy Theme and Plugin Upgrades ElasticPress Email Login Enable Media Replace Google Analytics Dashboard for WP (GADWP) Google Analytics for WordPress by MonsterInsights Gravity Forms Gravity Forms Duplicate Prevention Gravity Forms MailChimp Add-On Gravity Forms Partial Entries Gravity Forms Salesforce Add-On Gravity Forms Signature Add-On Gravity Forms Zapier Add-on Heartbeat Control Imagify Imsanity JSON API JSON API Auth JSON API Workers Mailgun Media File Manager NinjaFirewall (WP Edition) Optimize Images Resizing OptionAdmin Really Simple SSL User Role Editor WooCommerce WooCommerce Address Validation WooCommerce Authorize.Net CIM Gateway WooCommerce Name Your Price WooCommerce Payment Gateway Based Fees WooCommerce Stripe Gateway WooCommerce Subscriptions WP Crontrol WP Edit Pro WP Rocket Yoast SEO

Steps to reproduce:

  1. Install ElasticSearch and Sync
  2. Have active subscriptions that create renewals
lkraav commented 6 years ago

I also filed https://github.com/Prospress/woocommerce-subscriptions/issues/2529 for tracking upstream a few weeks ago.

nprasath002 commented 6 years ago

@KyleAtDND

Aside from receiving sync errors (not sure if that is an issue with WC Subs or something else

Can you provide the error log?

@lkraav I am not able to view the issue linked above. Let me know if its resolved?

lkraav commented 6 years ago

I am not able to view the issue linked above. Let me know if its resolved?

No, not resolved, everybody is trying to gather more data. I happen to have super limited time to help at the moment.

KyleWLawrence commented 6 years ago

@nprasath002 There actually wasn't anything in the log when this was going on. The only errors I received were in the WP CLI and the ElasticPress dashboard when I hit sync -> it would almost always do something like: get to 31/32 synced and freeze there and then maybe show an error message.

nprasath002 commented 6 years ago

Unfortunately we cannot access the codebase to Premium plugins thus restricting our ability to efficiently assist in regard to this issue. We recommend reaching out directly to your Premium Plugin provider

KyleWLawrence commented 6 years ago

@nprasath002 The license for WC plugins allows me to send it to you for testing this. What about if I sent ya'll the plugin file?

lkraav commented 6 years ago

Yep, I also have a 5-site license where I have domain names left over, so could easily share.

Overall, price of premium plugins is usually negligibly cheap in comparison to any outstanding issue. I will hereby upgrade my workflow towards offering free licenses to upstream developers, where for relevant issues, I look to carry the cost for a year or whatever the plugin license allows.

KyleWLawrence commented 6 years ago

What do you say @nprasath002, does that work?

brandwaffle commented 6 years ago

@KyleAtDND we actually run WooCommerce Subscriptions on an internal site, so we tracked down that license. We're investigating and will update you shortly.

KyleWLawrence commented 6 years ago

@brandwaffle Thanks! Let me know if there's anything we can do.

brandwaffle commented 6 years ago

@lkraav is there a way to get access to the Prospress issue? I'd love to see what's been discovered on that end as I dig in over here.

lkraav commented 6 years ago

Access is up to @thenbrent

Thus far, he provided a single comment on the matter, as follows:

No experience with ElasticPress, but these symptoms sound typical of broken object cache.

For a similar issue, see #1776 and #1770 where we had to change how we did things to work around Memcached issues. Specifically:

Memcached ... doesn't play nicely with expirations, provided in seconds, greater than 30 days. Expiration values greater than 30 days are treated as timestamps and therefore all TLC transients with an expiration > 0 expire immediately. All TLC expiration parameters are at least 1 year long.

What's more, expired Memcached transients don't get deleted but can be fetched before they are then cleared/expired.

Are there any gotchas with ElasticPress we should be aware of before going into the rabbit hole?

thenbrent commented 6 years ago

@brandwaffle I’ve just invited you to that repo so you can view that issue.

It’s worth reading my latest update, as this issue may not be worth the time fixing now seeing as we are moving away from using transients/object caching for related orders in the next minor version.

Ritesh-patel commented 6 years ago

Hi @thenbrent is the minor update fixed the issue? @lkraav @KyleAtDND can you guys also confirm the same?

lkraav commented 6 years ago

Hmm, http://dzv365zjfbd8v.cloudfront.net/changelogs/woocommerce-subscriptions/changelog.txt does not show anything new wrt to topic at hand for the latest minor version.

thenbrent commented 6 years ago

@Ritesh-patel @lkraav the minor version hasn't been released yet - v2.3.0 is the version it will be included in.

allan23 commented 6 years ago

Hi @thenbrent, does this mean that the issue will be resolved in 2.3.0 when released? Just clarifying that you are not awaiting anything on the ElasticPress side.

KyleWLawrence commented 6 years ago

Yes, very curious on this. Would be amazing to be able to use ElasticPress with WC again!

brandwaffle commented 4 years ago

Appears resolved based on a review of WooCommerce Subscriptions Github issue #2529. Closing this.