• Resolved mikedev

    (@mikedev)


    With the latest version of WordPress and WooCommerce, PHP 7.4, no plugins activated except WooCommerce, using Twenty Twenty theme, I get a 502 error when saving a product or activate/deactivate any plugin.

    On the server we turned off 60 second timeout script, saved a product and save query ran on Apache continually past 15 minutes and never stopped.

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://innerspacedev.wpengine.com
    Site address (URL): https://innerspacedev.wpengine.com
    WC Version: 4.9.1
    REST API Version: ? 4.9.1
    WC Blocks Version: ? 4.0.0
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.8.3
    Log Directory Writable: ?
    WP Version: 5.6
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.4.13
    PHP Post Max Size: 100 MB
    PHP Time Limit: 3600
    PHP Max Input Vars: 10000
    cURL Version: 7.58.0
    OpenSSL/1.1.1
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.32-35-log
    Max Upload Size: 50 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?
    
    ### Database ###
    
    WC Database Version: 4.9.1
    WC Database Prefix: wp_
    Total Database Size: 74.71MB
    Database Data Size: 51.71MB
    Database Index Size: 23.00MB
    wp_woocommerce_sessions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_order_items: Data: 0.01MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_order_itemmeta: Data: 0.19MB + Index: 0.07MB + Engine MyISAM
    wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.01MB + Engine MyISAM
    wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.08MB + Index: 0.09MB + Engine InnoDB
    wp_gf_addon_feed: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_gf_draft_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_gf_entry: Data: 1.35MB + Index: 0.15MB + Engine MyISAM
    wp_gf_entry_meta: Data: 5.33MB + Index: 3.02MB + Engine MyISAM
    wp_gf_entry_notes: Data: 0.27MB + Index: 0.08MB + Engine MyISAM
    wp_gf_form: Data: 0.01MB + Index: 0.00MB + Engine MyISAM
    wp_gf_form_meta: Data: 1.53MB + Index: 0.00MB + Engine MyISAM
    wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_gf_form_view: Data: 5.01MB + Index: 2.19MB + Engine MyISAM
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_mgmlp_folders: Data: 0.03MB + Index: 0.03MB + Engine MyISAM
    wp_nextend_smartslider_layouts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_nextend_smartslider_sliders: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_nextend_smartslider_slides: Data: 0.15MB + Index: 0.00MB + Engine MyISAM
    wp_nextend_smartslider_storage: Data: 0.03MB + Index: 0.01MB + Engine MyISAM
    wp_options: Data: 2.41MB + Index: 0.17MB + Engine InnoDB
    wp_postmeta: Data: 11.52MB + Index: 3.03MB + Engine InnoDB
    wp_posts: Data: 1.52MB + Index: 0.42MB + Engine InnoDB
    wp_responsive_menu: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    wp_rg_form: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_rg_form_meta: Data: 0.85MB + Index: 0.00MB + Engine MyISAM
    wp_rg_form_view: Data: 2.52MB + Index: 2.00MB + Engine InnoDB
    wp_rg_incomplete_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_rg_lead: Data: 1.52MB + Index: 0.17MB + Engine InnoDB
    wp_rg_lead_detail: Data: 2.52MB + Index: 5.05MB + Engine InnoDB
    wp_rg_lead_detail_long: Data: 0.15MB + Index: 0.01MB + Engine MyISAM
    wp_rg_lead_meta: Data: 2.02MB + Index: 0.14MB + Engine MyISAM
    wp_rg_lead_notes: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_signups: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_termmeta: Data: 0.07MB + Index: 0.05MB + Engine MyISAM
    wp_terms: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Data: 0.16MB + Index: 0.09MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.08MB + Index: 0.09MB + Engine InnoDB
    wp_usermeta: Data: 7.52MB + Index: 4.03MB + Engine InnoDB
    wp_users: Data: 0.38MB + Index: 0.28MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.05MB + Index: 0.09MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBadLeechers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlockedCommentLog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlockedIPLog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlocks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlocks7: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfBlocksAdv: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfConfig: Data: 0.52MB + Index: 0.01MB + Engine MyISAM
    wp_wfCrawlers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfFileChanges: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfFileMods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfHits: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfHoover: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfIssues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfKnownFileList: Data: 0.67MB + Index: 0.09MB + Engine MyISAM
    wp_wfLeechers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfLiveTrafficHuman: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfLockedOut: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfLocs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfLogins: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfNet404s: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfNotifications: Data: 0.02MB + Index: 0.00MB + Engine MyISAM
    wp_wfPendingIssues: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfReverseCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfScanners: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfSNIPCache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfStatus: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfThrottleLog: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_wfVulnScanners: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_yoast_indexable: Data: 2.52MB + Index: 0.78MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 0.09MB + Index: 0.14MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Data: 0.05MB + Index: 0.01MB + Engine MyISAM
    wp_yoast_seo_meta: Data: 0.04MB + Index: 0.04MB + Engine MyISAM
    
    ### Post Type Counts ###
    
    acf: 6
    acf-field: 15
    acf-field-group: 9
    amn_mi-lite: 3
    attachment: 1869
    feedback: 3
    header_row_images: 2
    installation: 8
    mc4wp-form: 1
    mgmlp_media_folder: 147
    nav_menu_item: 175
    nivoslider: 1
    oembed_cache: 6
    page: 69
    post: 2
    product: 219
    shop_coupon: 4
    shop_order: 84
    soliloquy: 4
    wp-help: 10
    wp_block: 11
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?
    
    ### Active Plugins (1) ###
    
    WooCommerce: by Automattic – 4.9.1
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Must Use Plugins (4) ###
    
    Force Strong Passwords - WPE Edition: by Jason Cosper – 1.6.4
    WP Engine Seamless Login Plugin: by WP Engine – 1.5.5
    WP Engine Security Auditor: by wpengine – 1.0.9
    WP Engine System: by WP Engine – 4.1.0
    
    ### Settings ###
    
    API Enabled: ?
    Force SSL: ?
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ?
    
    ### WC Pages ###
    
    Shop base: #2186 - /medical-storage/
    Cart: #3727 - /cart/
    Checkout: #3729 - /checkout/
    My account: #3731 - /my-account/
    Terms and conditions: #1501 - /terms/
    
    ### Theme ###
    
    Name: Twenty Twenty
    Version: 1.6
    Author URL: https://www.ads-software.com/
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Canceled: 1
    Oldest: 2021-01-22 10:01:15 -0500
    Newest: 2021-01-22 10:01:15 -0500
    
    Complete: 26
    Oldest: 2020-12-26 13:34:08 -0500
    Newest: 2021-01-22 13:10:22 -0500
    
    Pending: 2
    Oldest: 2021-01-24 12:48:02 -0500
    Newest: 2021-01-24 12:48:02 -0500
    
    
Viewing 15 replies - 1 through 15 (of 32 total)
  • One thing that I am seeing when running a trace on a request like this is that there’s a request to 192.0.66.5 IP and an update to the table wp_options using an INSERT INTO statement.

    This option is constantly updated wc_remote_inbox_notifications_specs in a never-ending loop.

    It seems that setting this option’s “autoload” setting to “no” fixes product updates.
    Updating Woo’s database doesn’t help either.

    I used this query to pull the option from the database:
    SELECT * FROM wp_options WHERE option_name = 'wc_remote_inbox_notifications_specs'

    Then I updated the “autoload” setting to “no” from “yes”.

    • This reply was modified 3 years, 10 months ago by sleuthbuilder.

    AMAZING find dasbuilder. Looks like it’s calling out to some external server for “remote notifications” and just hanging forever… Never knew this was a part of Woocommerce, but adding the following code to my functions.php file should disable that and fix the issue:

    add_filter('woocommerce_admin_features', 'pk_woocommerce_admin_features');
    function pk_woocommerce_admin_features($features) {
    	if(($key = array_search('remote-inbox-notifications', $features)) !== false) {
    		unset($features[$key]);
    	}
    }

    Seems to be related to https://www.ads-software.com/support/topic/cannot-update-products-since-last-update/

    Unfortunately, none of the possible fixes proposed on either thread has solved for us. It does appear to be a problem at multiple WooCommerce sites, but not at all.

    • This reply was modified 3 years, 10 months ago by CK MacLeod.

    Thanks Matt for your add_filter suggestion. It works ??

    I’ve opened an issue on Woocommerce’s github: https://github.com/woocommerce/woocommerce-admin/issues/6168

    Thank you @pkimatt and everyone else. I added that code to my site through the code snippets plugin and I am able to update products and activate/delete plugins as normal once again.

    There are multiple issues associated with this bug. One is timeouts when adding or editing products, both from the product editor ADD or EDIT screens, as well as from bulk editing. The other noted so far is timeouts when adding, activating, or de-activating plugins.

    The suggested filter did not work for us as written, possibly because we had already attempted a different fix from the database/options side (setting autoload on wc_remote_inbox_notifications_specs to false). Also, the filter function did not return a result.

    This simplified version of the snippet is working for us regarding products, but not for plugins:

    //WOOC BUGFIX
    add_filter( 'woocommerce_admin_features', 'pk_woocommerce_admin_features' );
    function pk_woocommerce_admin_features( $features ) { 
    
    	unset( $features['remote-inbox-notifications'] ) ; 
    	
    	//filters should return a result. 
    	return $features ; 
    	
    }

    For a temporary fix, until WooCommerce is updated, you can use the above code and comment out lines 69 and 70 (plugin actions in woocommerce/packages/src/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php

    Like so:

    //HACK Interrupt "phoning home" until WooCommerce is patched
    		//add_action( 'activated_plugin', array( __CLASS__, 'run' ) );
    		//add_action( 'deactivated_plugin', array( __CLASS__, 'run_on_deactivated_plugin' ), 10, 1 );

    @pkimatt your solution is working for me. Greatly appreciated!

    @pkimatt You’re a hero. Thank you so much – it works!

    Thought I should amend while awaiting action from WooCommerce/Automattic:

    At a vanilla site, the simpler code + hack solved both identified issues. At a much more complex site, I needed to use a version of the more complicated filter. So the “complete” interim fix, looked like this:

    //TEMPORARY BUGFIX FOR WOOCOMMERCE "PHONING HOME" - REMOVE AFTER WOOC FIXES
    add_filter('woocommerce_admin_features', 'pk_woocommerce_admin_features');
    function pk_woocommerce_admin_features($features) {
    
    	if(($key = array_search('remote-inbox-notifications', $features)) !== false) {
    		unset($features[$key]);
    	}
            // return other features if any (?)
    	return $features; 
    }

    To restore normal plugin-related update/activation actions, comment out lines 69 and 70 of woocommerce/packages/src/RemoteInboxNotifications/RemoteInboxNotificationsEngine.php

    Like so:

    //HACK Interrupt "phoning home" until WooCommerce is patched
    		//add_action( 'activated_plugin', array( __CLASS__, 'run' ) );
    		//add_action( 'deactivated_plugin', array( __CLASS__, 'run_on_deactivated_plugin' ), 10, 1 );

    Thank you everyone! @ck-macleod’s “double-hack” above worked in my case! ??

    Both hacks worked. The second PHP file is actually found here: woocommerce / packages / woocommerce-admin / src / RemoteInboxNotifications /

    This was driving me nuts! THANK YOU @ck-macleod and @pkimatt for these fixes!!

    @tracyandersonmd I see you got it fixed. I’ll emphasize that in normal circumstances I’d never hack WooCommerce core files, but in this case I strongly suspect a WooCommerce patch will be forthcoming soon, and it’ll be better just to have the hack overwritten. If the issue is handled without overwriting RemoteInboxNotificationsEngine.php, then the hack should be removed.

    If someone else wants to write a plugin that combines the filter and the hack in the form of “remove_action” actions, that would be better than what I’ve done, but I honestly expect this all to be taken care of literally any moment, considering the gravity of the bug, though maybe I’m too trusting…

    • This reply was modified 3 years, 10 months ago by CK MacLeod.
    RedForest

    (@redforeststudios)

    @ck-macleod, you sir, are a saint. Thanks for posting your workaround really appreciate it. I can confirm that I was able to save after applying this hack/fix on a rather complex custom product type project.

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Product Save Times Out to 502 Error’ is closed to new replies.