Forum Replies Created

Viewing 15 posts - 16 through 30 (of 48 total)
  • Author
    Posts
  • in reply to: Memory Leaks #2986
    Jonathan Moore
    Participant

    I know what you mean – and I will – but this doesn’t happen in a test environment, or interactively
    and the test environment isn’t trying to email clients about abandoned shopping carts etc etc.

    in reply to: Memory Leaks #2984
    Jonathan Moore
    Participant

    this is a decoy, it’s also blowing up with the coupon translation module turned off, but the abandoned cart and autocoupons turned on.

    in reply to: Memory Leaks #2983
    Jonathan Moore
    Participant

    yes, I just added a transient for the coupons..

    in reply to: Memory Leaks #2981
    Jonathan Moore
    Participant

    haha yes,
    I’m just going to try disabling the whole module if we’re in cron.

    I’m suspecting the term translations as I know Polylang did some “optimisation” on that in recent versions: where the coupon is linked to product category it’s also trying to get the category translations..

    in reply to: Memory Leaks #2978
    Jonathan Moore
    Participant

    oddly, that change alone seemed to make things much worse…

    in reply to: Memory Leaks #2969
    Jonathan Moore
    Participant

    probably, the cart is instantiated by the abandoned shopping carts which is checking in the background to see if it should send an email reminder: at this point there is no user request and no order language set, so polylang can’t detect language.

    On the other hand, there is no user to choose free products, and the free product selection doesn’t appear and isn’t needed in the shopping cart reminder email, so could we ensure that the free products selection is not even called if there is no request context?

    I’ll look at this some more..

    in reply to: Memory Leaks #2968
    Jonathan Moore
    Participant

    I’m wrong again, as soon as I turn everything back on, it came back again, like clockwork, 15min fails.
    However I’ve now narrowed my suspicions to use of:

    
    add_filter('woocommerce_coupon_get__wjecf_free_product_ids',
                    array($this, 'getFreeProductsInLanguage'), 10, 2);
    

    Within Hyyan WooCommerce Polylang integration.

    Since I wrote and contributed that part of the code that simplifies my research..

    All it does is when the user has a choice of free products (added by an auto-added coupon), these products offered are substituted by the correct language versions.
    Normally this works fine but something about recent Polylang updates and term optimisations must be throwing it out. Or some corruption somewhere in the whole wp terms (wp_term_relationships has 37,568 rows).
    Or also, it’s getting called when it shouldn’t be.

    Anyhow I’ll run with that feature disabled for a day or two and see how it goes.

    If you think of any reason use of woocommerce_coupon_get__wjecf_free_product_ids might cause a problem please let me know..

    in reply to: Memory Leaks #2964
    Jonathan Moore
    Participant

    no there’s nothing directly related in the Apache logs, but actually I don’t think there’s a request either – I’d already established from some of the logs $_SERVER[‘REQUEST_URI’] etc are not set, hence is from cron call etc

    I tried re-enabling without AutoCoupon and then with AutoCoupon and only had one memory blowout in last 5 hours (previously was about every 15min regardless of increasing memory) which was:
    PHP Fatal error: Allowed memory size of 201326592 bytes exhausted (tried to allocate 4194304 bytes) in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 455
    ‘value’ => maybe_unserialize( $meta->meta_value ),
    .. I can’t find any meta value in the db which could account for 4,194,304 bytes so that remains odd..

    I had cleared all transients and user sessions (including shopping carts) from the woocommerce screen, and then gone through applying workarounds to every plugin that was showing any type of minor error.
    A corrupted transient / basket seems likely cause of main issue, though exactly how it was triggering any code weakness remains unclear.

    in reply to: Memory Leaks #2961
    Jonathan Moore
    Participant

    >error_log the url of every http request, to find out in which requests the issue
    Well Apache should already do that, not sure what logging from the app would most help

    >The Abandoned Cart plugin is not in the status
    Yes I turned it off in case it was the problem

    >Did emptying the wrappers array help at all?
    I didn’t do that yet, I will

    >If instead of disabling our plugin completely, just disabling AutoCoupon
    Well this is the functionality mainly used so not so keen on disabling it

    Thanks, some more things to try

    in reply to: Memory Leaks #2957
    Jonathan Moore
    Participant

    I thought I was getting somewhere as the errors seem to occur roughly every 15 minutes, which coincides with the cron job:
    */15 * * * * wget -q -O – https://www.mysite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

    I turned off the only job that WP Crontrol said was due:
    woocommerce_ac_send_email_action wcal_send_email_cron()
    Abandoned Cart Lite for WooCommerce (the free version on wordpress.org/plugins)
    but that didn’t seem to solve it, even turning off the plugin altogether.

    Turning off the cron job altogether certainly seemed to reduce the occurrence of problems but not eliminate it.
    Once again the only sure way of eliminating the problem was deactivating this plugin.

    in reply to: Memory Leaks #2953
    Jonathan Moore
    Participant

    Yes 2.6.2 – only noticed one call of this type

    in reply to: Memory Leaks #2946
    Jonathan Moore
    Participant

    Oh, and I kick of the wordpress cron from Unix rather than the visitor triggered.
    I wonder if it would be valid to test for WJECF()->is_request( ‘cron’ ) and not load the plugin for cron, or whether there is any case where it would be needed.

    in reply to: Memory Leaks #2945
    Jonathan Moore
    Participant

    could I send the WC System Status Report separately rather than posting publicly on the forum?

    in reply to: Memory Leaks #2944
    Jonathan Moore
    Participant

    There are 36 coupons and 1,411 products so I’m more wondering about the product wrapping.
    The single use free gift coupon has been auto-applied and used 217 times.

    I had reduced the PHP memory limit from 300MB to 192MB and the timeout from 120s to 90s, everything running fine for >12 hours including new orders received with this plugin turned off. (I’m thinking about reducing it further to fail faster)
    But when I turn this plugin back on again the errors recur.

    I’m not able to cause a hang interactively which is why I think one of the cron jobs must be causing it.
    Server load is fairly low and Apache/PHP-FPM load is mitigated by using nginx in front, supercache generated pages processed via .htaccess and redis cache. but when these problems occur php-fpm uses up max cpu and also blows memory limit – at least if allowed to run for long enough.

    This is this morning – interactively auto-coupons etc are working correctly and this plugin log seems ok, but then in the background something else is happening:
    [09-Apr-2018 06:06:09 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_WC.php on line 24
    [09-Apr-2018 06:07:39 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 586
    [09-Apr-2018 06:09:09 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/object-cache.php on line 965
    [09-Apr-2018 06:10:40 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-includes/class-wp-list-util.php on line 166
    [09-Apr-2018 06:10:56 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 678
    [09-Apr-2018 06:10:56 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-hook.php on line 277
    [09-Apr-2018 06:10:56 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-hook.php on line 277
    [09-Apr-2018 06:10:56 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-hook.php on line 277
    [09-Apr-2018 06:10:56 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-hook.php on line 277
    [09-Apr-2018 06:10:56 UTC] PHP Warning: Invalid argument supplied for foreach() in /wp-includes/class-wp-hook.php on line 277
    [09-Apr-2018 06:12:26 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 554
    [09-Apr-2018 06:13:56 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-includes/plugin.php on line 191
    [09-Apr-2018 06:15:27 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-includes/taxonomy.php on line 1392
    [09-Apr-2018 06:16:59 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-product.php on line 1120
    [09-Apr-2018 06:50:56 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Wrap.php on line 26

    Running on PHP7, does Polylang which has the WPML capable api which has been working fine with this plugin, I haven’t updated woocommerce recently (3.1.2) but there have been updates to WP and Polylang.
    But what is coming up consistently in the logs is the woocommerce product data and the WJECF wrap.
    I’ve used this plugin for over a year without noticing major problem until recent months.
    I do note this plugin is generally well defensively coded with use of safe_add_action to avoid recursion.
    And in some place tests for: WJECF()->is_request( ‘frontend’ )

    But some combination of factors is triggering an infinite loop until out of memory or execution time or both.

    in reply to: Memory Leaks #2939
    Jonathan Moore
    Participant

    I got this plugin mainly to be able to do auto-coupon, so yes I have a free gift for first time buyers, optional rewards for spending more than a certain amount and a 5 for 4 type deal on some product category for example.

    I’ve been running with the plugin disabled again for some hours and everything has been fine with no further errors reported.

    I’ll dig some more and have a look at the change you suggested.

Viewing 15 posts - 16 through 30 (of 48 total)