Support » Plugin: Facebook for WooCommerce » Memory limit reached after last update

  • Resolved artmobbing

    (@artmobbing)


    Hi,
    The plugin worked very well until yesterday, when I get the second-to-last version update.
    This is what happened.
    When FB for WOO is activated WYSIWYG for products taxonomy gave me a blank page with any JS error in console.
    So I tried to see the server side log, discovering the WOO / FB plugin had this memory limit error:

    [error] [client xxx.xxx.xxx.xx] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /web/htdocs/www.xxxxx.com/home/wp-includes/class-wp-fatal-error-handler.php on line 72, referer: https://www.xxxxx.com/wp-admin/plugins.php?plugin_status=all&paged=1&s
    [error] [client xxx.xxx.xxx.xx] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /web/htdocs/www.xxxxx.com/home/wp-content/plugins/facebook-for-woocommerce/includes/Products/FBCategories.php on line 47, referer: https://www.xxxxx.com/wp-admin/plugins.php?plugin_status=all&paged=1&s

    If I try to deactivate the WOO FB plugin the add / edit product UI correctly works.
    Today I tried to update with the very last release of the plugin published some hours ago with no success.

    The plugin silently works in background.
    ie. my catalog is costantly updated… I’ve updated my catalog using wooapp during the whole day and all the products are correctly uploaded on my FB insta shop.

    Any idea?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Thread Starter artmobbing

    (@artmobbing)

    Hi all.
    Some details more and a temporarly fix here.
    First – for more precision in debugging – I spend a line here to clear what version I’ve installed and the updates done:
    1. update from 1.11.4 to 2.1.3 -> Memory limit issue
    2. update from 2.1.3 to 2.1.4 -> Memory limit issue
    So this morning I downgraded
    3. downgrade frmo 2.1.4 to 2.0.5 (v2’s first stable) -> problem FIXED. arrrh.

    Now I’ll wait to update till the next release.
    Hope this help improving this GREAT plugin.
    aRt.

    I’m having the same problem, and now I cannot edit my WooCommerce products.

    Checking the “Programmed Actions” in the WooCommerce “Status” page, I realized that I have a lot of failed actions, and they are all from “wc_facebook_regenerate_feed”. They all say that “the action timed out after 300 seconds”. They all started a couple of days ago, I’m assuming maybe after the last update.

    I tried deleting the product catalog from Facebook, and re-connecting the plugin, but this also didn’t work, and now my Facebook and Instagram stores are not showing because they don’t have products.

    Bottom line, something is wrong with the catalog syncing, and it times out. This didn’t happened before with my settings, so it’s not a “not enough memory” problem.

    Plugin Support Julie Martin

    (@julieskyverge)

    Hi @artmobbing,

    Thanks for reaching out to us and sending along all these details, I appreciate it!

    I recognize you’ve swapped back to an older version. Did you try any conflict testing before doing so? I would recommend first trying with a default theme, such as Twenty Nineteen, and if the memory error still persists, to try (still with a default theme) to disable all plugins except WooCommerce and Facebook for WooCommerce. If you can try that out and let me know if the memory errors are resolved in either case, that would be appreciated! If not, I understand — things are working now and you might not want to mess with things.

    @gmedel – to keep with forum guidelines, can you please open your own topic with a paste of your system status so I can get a better idea of what might be going on? You can grab it by going to:

    WooCommerce > Status and clicking on Get system report.

    Thanks!

    Julie πŸ™‚
    SkyVerge

    Thread Starter artmobbing

    (@artmobbing)

    Hi,
    Sorry, no way to do so on my production site.
    Your plugin was working fine till last update…
    Here you can find a list of active plugin:

    Anti-Malware Security and Brute-Force Firewall by Eli Scheetz.
    Breadcrumb NavXT by John Havlik.
    Cloudflare by Cloudflare, Inc..
    Code Snippets by Code Snippets Pro.
    ET Shortcodes by Elegant Themes.
    Facebook for WooCommerce by Facebook.
    Force HTTPS by LittleBizzy.
    GDPR Cookie Compliance (CCPA, PIPEDA ready) by Moove Agency.
    Google XML Sitemaps by Auctollo.
    Jetpack by WordPress.com by Automattic.
    Meta Box by MetaBox.io.
    Optimize Database after Deleting Revisions by CAGE Web Design | Rolf van Gelder, Eindhoven, The Netherlands.
    Packlink PRO Shipping by Packlink Shipping S.L..
    Plugins List by David Artiss.
    Popup Maker by Popup Maker.
    Preview E-mails for WooCommerce by Digamber Pradhan.
    Show IDs by 99 Robots.
    Smash Balloon Instagram Feed by Smash Balloon.
    Themify – WooCommerce Product Filter by Themify.
    WooCommerce by Automattic.
    WooCommerce PayPal Checkout Gateway by WooCommerce.
    WooCommerce Shipping & Tax by Automattic.
    WooCommerce Stripe Gateway by WooCommerce.
    WordPress Importer by wordpressdotorg.
    WP-PageNavi by Lester ‘GaMerZ’ Chan.
    WP Fastest Cache by Emre Vona.
    WP Fastest Cache Premium by Emre Vona.
    WP Force SSL by WebFactory Ltd.
    WP GDPR Compliance by Van Ons.
    WP Mail SMTP by WPForms.
    WP Product Feed Manager by Michel Jongbloed.
    YITH WooCommerce Checkout Manager by YITH.
    YITH WooCommerce Dynamic Pricing and Discounts Premium by YITH.
    Yoast Duplicate Post by Enrico Battocchi & Team Yoast.
    Yoast SEO: WooCommerce by Team Yoast.
    Yoast SEO Premium by Team Yoast.

    Hope useful
    Thnx.

    Plugin Support Julie Martin

    (@julieskyverge)

    Hi @artmobbing,

    Thanks for the added information here and apologies for the delay, this message never made it to our helpdesk, unfortunately.

    If you can’t test more thoroughly in terms of swapping to a default theme and trying to see if disabling some plugins helps, then I’d recommend talking to your hosting provider and asking them to increase the amount of RAM dedicated to your WordPress instance. It looks as though you have 256MB dedicated to it, so you may want to try to bump that to 512MB to see if that helps out.

    Would you please keep us posted?

    Thanks so much,

    Julie πŸ™‚
    SkyVerge

    I’ve got the exact same issue and found the reason after a small deepdive.

    Error: facebook-for-woocommerce/includes/Products/FBCategories.php on line 47

    It seams that there is a json file which is being generated by Facebook for WC. This file is in my case quite large 18,8 MB(!!!). Every time a page is loaded this file is loaded as wel. (line 47) Which is causing the memoryleak.

    This file was added 7 weeks ago on rev: 2407164
    https://plugins.trac.wordpress.org/browser/facebook-for-woocommerce/trunk/includes/Products/fb_google_category_to_attribute_mapping.json?rev=2407164

    const ATTRIBUTES_FILE = ‘fb_google_category_to_attribute_mapping.json’;

    Why is this file loaded? And why is this 18MB large? If I check the reason it is only because loading the FB categories (and subcategories).

    @dfeldbrugge I have a similar problem, it is causing failed actions in the action scheduler, and trying to access the plugin config page causes a server 503.

    @julieskyverge can you please review my posts I see a lot of complains with memory leak. The solution lies I the json file off 18mb. I think it isnt necessary at all. I’ve deleted the file and the plugins still sync with facebook correctly. I think this code is development code instead of production code.

    A fix is needed very soon because lot of people complain!just check your one star reviews over the last month…

    fuzioneer

    (@fuzioneer)

    I have this exact same issue, when is a fix being rolled out ?

    janiklipke

    (@janiklipke)

    Same issue for me on a newly installed website that is luckily not live yet. @artmobbing thanks for the exploration so far, can you tell me where the stable version 2.05 of the plugin that you are using at the moment can be downloaded?

    @julieskyverge this is the error message that appeard in the e-mail notification I receive:

    Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes)

    Thanks

    What I did is rename the fb_google_category_to_attribute_mapping.json
    So it is not loaded anymore.

    Facebook sync still works and sites runs smoothly again.

    I think this dev code in production branche.

    This needs to be fixed asap @julieskyverge

    janiklipke

    (@janiklipke)

    Thank for the quick fix, @dfeldbrugge I’ve renamed the file and will keep you posted it it works for me as well.

    Plugin Support Mike Straw

    (@mikestraw)

    Hi all,

    Thanks for the follow-ups, reports, and workarounds!

    I did find that this issue has been reported and so is on the radar for a fix.

    I’ve added a note there regarding this forum thread, so the scope of the impact is seen.

    Since the issue is being tracked on the GitHub repository, I’m going to mark this particular thread as resolved. If anyone has input to the issue itself, you can definitely comment or submit a PR on the issue πŸ™‚

    If you have any other issues, go ahead and start a new thread.

    negapo

    (@negapo)

    I’m also experiencing this memory leak, we have a VPS with plenty of CPU and RAM and the plug-in is retrying a failed schedule action to sync every 3 minutes and fails while exhausting the RAM.
    In our case it seams a conflict with SiteGround optimizer plug-in (SG Optimizer), more precisely with Memcache. I saw the github issue but im not sure if its the same thing. I havent tried the workaround with the json file, i just disabled sync for now.

    I have the same pb

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Memory limit reached after last update’ is closed to new replies.