Support » Plugin: WooCommerce » Connection issues while updating products

  • Resolved artison.in

    (@artisonin)


    We are in dire need of help here. Out of nowhere since the past couple of days, my website is intermittently down and the problem most certainly happens when i do any update on my products from dashboard. my hosting company [godaddy] has flat out denied any issues from their end. i have since uninstalled my original theme and did quick patch work with storefront. did disable all plugins and verified. the problem persists. cleaned up database a bit, no help. Please note my resources look fine. this is most certainly a connection issue. also i had previously installed autoptimize and later uninstalled. not sure if any of its residue is causing the problem.

    i have a video simulating the problem here -> https://drive.google.com/file/d/1bakSitZNkumJY6ZCGIiNi42hTAsFKr_u/view?usp=sharing

    my configs are as follows –
    WordPress 5.1.1 running Storefront theme
    Woocommerce – Version 3.6.1
    Current PHP version: 7.1
    max_execution_time 300
    max_input_time -1
    memory_limit 512M
    post_max_size 128M
    upload_max_filesize 512M

    please let me know if a fresh install of everything would help or what should i be doing to debug the issue.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • There’s nothing in your HTML referring to Autoptimize, so it is extremely unlikely that that would be causing such issues (all the more as the problem only occurs when you’re changing values in the backend, which is unrelated with where Autoptimize is active).

    Hope this clarifies,
    frank (ao dev)

    thanks for clarifying. since installing autoptimise was the only noticeable change i made, i had to mention.

    my problem still persists. if any one could throw some light, would be of much help. TIA

    Plugin Author peterfabian1000

    (@peterfabian1000)

    Hi @artisonin

    When you say your site is down, can you still log in to admin or is the whole site down including the admin?
    Can you find out what is the exact HTTP code you get when your site is down? Can you check your logs if there is anything suspicious there? (Some logs you can find under WooCommerce > Status > Logs, but you might need to check also HTTP server logs or database logs)

    It’s a bit difficult to say what might be the problem as your site seems to be up now.

    thank you for the reply, @peterfabian1000

    the whole site seems to be down. when i ping from servers like “https://www.isitdownrightnow.com/” it shows the site is down. after a while, when the product update is done, the site is back running. no error is shown, the connection appears to be lost.

    i have a video simulating the whole problem here, kindly have a look -> https://drive.google.com/file/d/1bakSitZNkumJY6ZCGIiNi42hTAsFKr_u/view?usp=sharing

    i can share screenshots if need be. last few lines from error logs as follows

    `[19-Apr-2019 06:45:18 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT * FROM wp_posts WHERE ID = 20274 LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/single-product.php’), wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_after_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_output_related_products, woocommerce_related_products, array_map, wc_get_product, WC_Product_Factory->get_product, WC_Product_Simple->__construct, WC_Product->__construct, WC_Data_Store->read, WC_Product_Data_Store_CPT->read, get_post, WP_Post::get_instance
    [19-Apr-2019 06:45:18 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (6156,6157,6159,8324) AND wp_posts.post_type = ‘nav_menu_item’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_posts.menu_order ASC made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/single-product.php’), get_header, locate_template, load_template, require_once(‘/themes/storefront/header.php’), do_action(‘storefront_header’), WP_Hook->do_action, WP_Hook->apply_filters, storefront_secondary_navigation, wp_nav_menu, wp_get_nav_menu_items, get_posts, WP_Query->query, WP_Query->get_posts
    [19-Apr-2019 06:45:18 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT * FROM wp_posts WHERE ID = 20916 LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/taxonomy-product_cat.php’), wc_get_template, include(‘/plugins/woocommerce/templates/archive-product.php’), wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-product.php’), do_action(‘woocommerce_before_shop_loop_item_title’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_loop_product_thumbnail, woocommerce_get_product_thumbnail, WC_Product->get_image, wc_placeholder_img, wc_placeholder_img_src, wp_get_attachment_image_src, image_downsize, wp_attachment_is_image, wp_attachment_is, get_post, WP_Post::get_instance
    [19-Apr-2019 06:46:03 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (5800,5837,5902,5904,7042,13442,13676,14532,16452,16698,17722,19422,19714,19804) AND wp_posts.post_type = ‘nav_menu_item’ AND ((wp_posts.post_status = ‘publish’)) ORDER BY wp_posts.menu_order ASC made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/single-product.php’), get_header, locate_template, load_template, require_once(‘/themes/storefront/header.php’), do_action(‘storefront_header’), WP_Hook->do_action, WP_Hook->apply_filters, storefront_primary_navigation, wp_nav_menu, wp_get_nav_menu_items, get_posts, WP_Query->query, WP_Query->get_posts
    [19-Apr-2019 06:46:03 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT * FROM wp_posts WHERE ID = 20916 LIMIT 1 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/plugins/woocommerce/templates/taxonomy-product_cat.php’), wc_get_template, include(‘/plugins/woocommerce/templates/archive-product.php’), wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-product.php’), do_action(‘woocommerce_before_shop_loop_item_title’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_template_loop_product_thumbnail, woocommerce_get_product_thumbnail, WC_Product->get_image, wc_placeholder_img, wc_placeholder_img_src, wp_get_attachment_image_src, image_downsize, wp_get_attachment_url, get_post, WP_Post::get_instance
    [19-Apr-2019 06:46:03 UTC] WordPress database error Lost connection to MySQL server during query for query SELECT * FROM wp_posts WHERE ID = 5 LIMIT 1 made by require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’), do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Post_Types::register_post_types, get_post, WP_Post::get_instance
    [19-Apr-2019 08:21:40 UTC] billing_first_name was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WP_Gateway_Instamojo->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [19-Apr-2019 08:21:40 UTC] billing_last_name was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WP_Gateway_Instamojo->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [19-Apr-2019 08:21:40 UTC] billing_email was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WP_Gateway_Instamojo->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [19-Apr-2019 08:21:40 UTC] billing_phone was called incorrectly. Order properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_checkout’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::checkout, WC_Checkout->process_checkout, WC_Checkout->process_order_payment, WP_Gateway_Instamojo->process_payment, WC_Abstract_Legacy_Order->__get, wc_doing_it_wrong. This message was added in version 3.0.
    [19-Apr-2019 09:55:49 UTC] PHP Warning: json_decode() expects parameter 1 to be string, array given in /home/artison/public_html/wp-content/plugins/updraftplus/includes/Google/Auth/OAuth2.php on line 177`

    Plugin Author peterfabian1000

    (@peterfabian1000)

    I would suggest contacting your host with the error you pasted here. It seems that WordPress loses connection to the database when performing a query (even a simple one) and that can be difficult to debug between us here.

    Another thing to check would be to disable all plugins, including WooCommerce, switch to Twenty Nineteen theme (the default WP theme) and check if you can update Posts or Pages.

    Also, the errors suggest the site is most likely still using some other code that calls some functions incorrectly (e.g. billing_first_name was called incorrectly. Order properties should not be accessed directly), so I think fresh install should probably solve this for you.

    i do not have problems updating pages/posts. updating products in woocommerce is when the issue happens. by fresh install, do you suggest, i backup and completely remove woocommerce and reinstall?

    Plugin Author peterfabian1000

    (@peterfabian1000)

    If you want to keep the database you have, I would first try to remove all plugins and themes from WP admin, then delete subfolders in wp-content/themes and wp-content/plugins and then I’d try to install only Woocommerce and Storefront from within WordPress.

    If that does not help, you would probably need to either ask for support from your hosting provider or contact our support via https://woocommerce.com/contact-us/ if you’re a paying customer.

    thank you. will try this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Connection issues while updating products’ is closed to new replies.