Repository › Forums › Support › WooCommerce Extended Coupon Features PRO › Memory Leaks
- This topic has 34 replies, 2 voices, and was last updated 6 years, 5 months ago by Soft79.
-
AuthorPosts
-
April 13, 2018 at 8:41 pm #3013Jonathan MooreParticipant
Update: after applying fixes to various possible memory issues, including your suggestion on clearing the wrappers array, I can now consistently produce maximum execution time exceeded rather than out of memory,
disabling WJECF_AutoCoupon fixes the problem,
Turning it back on starts it again.When I turned the feature on, I tested it and it was working fine, the errors didn’t start until over an hour later but were then regular.
This makes me suspect interaction with the abandoned shopping cart – after an hour my test cart would be counted as abandoned and the abandoned carts would then be tracking them on a cron job.
The actual timeout errors hit common function calls that are too frequently called to be easily traced.
[13-Apr-2018 16:33:28 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/post.php on line 1939
[13-Apr-2018 16:33:57 UTC] PHP Notice: Undefined index: HTTP_REFERER in wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 2690
[13-Apr-2018 16:34:59 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/object-cache.php on line 960
[13-Apr-2018 16:36:29 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/plugins/woocommerce/includes/wc-formatting-functions.php on line 558
[13-Apr-2018 16:38:00 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/plugin.php on line 182
[13-Apr-2018 16:39:31 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/taxonomy.php on line 1399
[13-Apr-2018 16:41:03 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/plugin.php on line 191
[13-Apr-2018 16:46:29 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/plugins/woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php on line 377
[13-Apr-2018 16:47:19 UTC] PHP Notice: Undefined index: HTTP_REFERER in wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 2690
[13-Apr-2018 16:48:00 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/plugins/polylang/include/translated-object.php on line 179
[13-Apr-2018 16:49:31 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/object-cache.php on line 967
[13-Apr-2018 17:00:41 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/post.php on line 1974
[13-Apr-2018 17:02:12 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-includes/class-wp-post.php on line 251
[13-Apr-2018 17:03:43 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 555
[13-Apr-2018 17:05:13 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php on line 664
[13-Apr-2018 17:06:44 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in wp-content/object-cache.php on line 965April 13, 2018 at 8:50 pm #3014Soft79KeymasterPlease try to get a trace using the trick I provided.
April 13, 2018 at 9:02 pm #3015Jonathan MooreParticipantyes I had added such a trace but it is not tripping as no longer reaching that memory level.
I’m going to turn off the WPML module as Polylang WPML compatibility layer will be hooking this and partly duplicating the Hyyan Polylang WooCommerce Coupon module. It might be an idea to detect this.April 13, 2018 at 9:08 pm #3016Jonathan MooreParticipantno it’s not the WPML module, still starts timing out as soon as autocoupon turned on.
April 13, 2018 at 9:15 pm #3017Soft79KeymasterThen use microtime() to detect elapsed execution time.
Or use register_shutdown_function() and log backtrace before shutting down after an exception. For an example, see includes/class-woocommerce.php how WooCommerce does it.Will not work -
AuthorPosts
- You must be logged in to reply to this topic.