502 Bad Gateway
-
Hi
I just updated to Version 3.0.2 and now I get a “502 Bad Gateway” each time I click “G? til betaling (Proceed to payment).
What can be causing this?
The URL is https://www.vinhit.dk/
I appreciate your fast response if possible ??
/Peter
-
I have the same problem. Did you figure this out yet?
Could you please try inserting the following to your wp-config.php ?
ini_set(‘log_errors’,TRUE);
ini_set(‘error_reporting’, E_ALL);
ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’);
This will produce a file called ‘error_log.txt’ in your WordPress rootHopefully it gives a limited but useful error report. Please paste the result here.
Could you please try inserting the following to your wp-config.php ?
ini_set(‘log_errors’,TRUE);
ini_set(‘error_reporting’, E_ALL);
ini_set(‘error_log’, dirname(__FILE__) . ‘/error_log.txt’);
This will produce a file called ‘error_log.txt’ in your WordPress rootHopefully it gives a limited but useful error report. Please paste the result here.
Here’s the result
[02-Oct-2014 15:37:26 UTC] LONG QUERY (1083 characters long generated in /nas/wp/www/cluster-10111/vinhit/wp-content/plugins/woocommerce/includes/class-wc-cart.php:464): SELECT SUM( order_item_meta.meta_value ) AS held_qty FROM wp_vinhitposts AS posts LEFT JOIN wp_vinhitwoocommerce_order_items as order_items ON posts.ID = order_items.order_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta2 ON order_items.order_item_id = order_item_meta2.order_item_id LEFT JOIN wp_vinhitterm_relationships AS rel ON posts.ID=rel.object_ID LEFT JOIN wp_vinhitterm_taxonomy AS tax USING( term_taxonomy_id ) LEFT JOIN wp_vinhitterms AS term USING( term_id ) WHERE order_item_meta.meta_key = '_qty' AND order_item_meta2.meta_key = '_product_id' AND order_item_meta2.meta_value = 2002 AND posts.post_type = 'shop_order' AND posts.post_status = 'publish' AND tax.taxonomy = 'shop_order_status' AND term.slug IN ('pending') AND posts.ID != 0 [02-Oct-2014 15:37:32 UTC] LONG QUERY (1083 characters long generated in /nas/wp/www/cluster-10111/vinhit/wp-content/plugins/woocommerce/includes/class-wc-cart.php:464): SELECT SUM( order_item_meta.meta_value ) AS held_qty FROM wp_vinhitposts AS posts LEFT JOIN wp_vinhitwoocommerce_order_items as order_items ON posts.ID = order_items.order_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta2 ON order_items.order_item_id = order_item_meta2.order_item_id LEFT JOIN wp_vinhitterm_relationships AS rel ON posts.ID=rel.object_ID LEFT JOIN wp_vinhitterm_taxonomy AS tax USING( term_taxonomy_id ) LEFT JOIN wp_vinhitterms AS term USING( term_id ) WHERE order_item_meta.meta_key = '_qty' AND order_item_meta2.meta_key = '_product_id' AND order_item_meta2.meta_value = 2002 AND posts.post_type = 'shop_order' AND posts.post_status = 'publish' AND tax.taxonomy = 'shop_order_status' AND term.slug IN ('pending') AND posts.ID != 0 [02-Oct-2014 15:37:33 UTC] LONG QUERY (1676 characters long generated in /nas/wp/www/cluster-10111/vinhit/wp-content/plugins/woocommerce/includes/class-wc-tax.php:305): SELECT * FROM ( SELECT tax_rates.* FROM wp_vinhitwoocommerce_tax_rates as tax_rates LEFT OUTER JOIN wp_vinhitwoocommerce_tax_rate_locations as locations ON tax_rates.tax_rate_id = locations.tax_rate_id LEFT OUTER JOIN wp_vinhitwoocommerce_tax_rate_locations as locations2 ON tax_rates.tax_rate_id = locations2.tax_rate_id WHERE tax_rate_country IN ( 'DK', '' ) AND tax_rate_state IN ( '', '' ) AND tax_rate_class = '' AND ( ( locations.location_type IS NULL ) OR ( locations.location_type = 'postcode' AND locations.location_code IN ('*','8240','824*','82*','8*','*') AND locations2.location_type = 'city' AND locations2.location_code = 'RISSKOV' ) OR ( locations.location_type = 'postcode' AND locations.location_code IN ('*','8240','824*','82*','8*','*') AND 0 = ( SELECT COUNT(*) FROM wp_vinhitwoocommerce_tax_rate_locations as sublocations WHERE sublocations.location_type = 'city' AND sublocations.tax_rate_id = tax_rates.tax_rate_id ) ) OR ( locations.location_type = 'city' AND locations.location_code = 'RISSKOV' AND 0 = ( SELECT COUNT(*) FROM wp_vinhitwoocommerce_tax_rate_locations as sublocations WHERE sublocations.location_type = 'postcode' AND sublocations.tax_rate_id = tax_rates.tax_rate_id ) ) ) GROUP BY tax_rate_id ORDER BY tax_rate_priority, tax_rate_order ) as ordered_taxes GROUP BY tax_rate_priority [02-Oct-2014 15:37:38 UTC] LONG QUERY (1083 characters long generated in /nas/wp/www/cluster-10111/vinhit/wp-content/plugins/woocommerce/includes/class-wc-cart.php:464): SELECT SUM( order_item_meta.meta_value ) AS held_qty FROM wp_vinhitposts AS posts LEFT JOIN wp_vinhitwoocommerce_order_items as order_items ON posts.ID = order_items.order_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id LEFT JOIN wp_vinhitwoocommerce_order_itemmeta as order_item_meta2 ON order_items.order_item_id = order_item_meta2.order_item_id LEFT JOIN wp_vinhitterm_relationships AS rel ON posts.ID=rel.object_ID LEFT JOIN wp_vinhitterm_taxonomy AS tax USING( term_taxonomy_id ) LEFT JOIN wp_vinhitterms AS term USING( term_id ) WHERE order_item_meta.meta_key = '_qty' AND order_item_meta2.meta_key = '_product_id' AND order_item_meta2.meta_value = 2002 AND posts.post_type = 'shop_order' AND posts.post_status = 'publish' AND tax.taxonomy = 'shop_order_status' AND term.slug IN ('pending') AND posts.ID != 0 [02-Oct-2014 15:37:38 UTC] PHP Notice: Undefined index: woo_nonce in /nas/wp/www/cluster-10111/vinhit/wp-content/themes/canvas/functions/classes/class-wf-meta.php on line 144
Peter, thanks for the report. It did not give me that much information as I hoped for. The queries mentioned has nothing to do with the plugin, and im not sure whether these logs causes any actual problems. Since the 502 error is a direct server error, i suggest you take contact to your hosting provider who have access to the server logs. They can most likely give you an explanation of what is happening when you reach the checkout page.
Add first i got the error_log.txt and it had some errors, but not anything concerning this issue. I fixed those and now no error_log.txt file is being generated. No errors I guess. Hopefully Peters error log can point you in some direction.
Andreas, I will give you the same advice as I gave Peter. Since the 502 error is a direct server error, i suggest you take contact to your hosting provider who have access to the server logs. They can most likely give you an explanation of what is happening when you reach the checkout page.
I have now downgraded to version 2.1.5 and everything works again.
I have opened a ticket at my hosting company (wpengine.com) and will keep you updated. But to me it seems rather unlikely that it’s the servers and not the plugin that has errors.
I have seen other support tickets with people using wpengine struggling with 502 bad gateway errors. Maybe the plugin is interrupting with some kind of setup on their servers – I hope we can find a solution to this when the support gets back to you.
I’m on wpengine.com as well and 2.1.5 works for me. Do you have WPML installed @peter?
Nope. I use Codestyling Localization https://www.ads-software.com/plugins/codestyling-localization/
2.1.6 works for me as well.
Here’s the reply I got from wpengine:
“I have checked it out and I am not able to replicate the 502 errors. This is usually due to script or service timing out before the page request is finished. Normally it is caused by a plugin or theme issue. I did notice you have a important update for WooCommerce. I would highly recommend trying to update this first before further troubleshooting. If that does not work then try pushing your site from live to staging and use the default TwentyFourteen theme.”
I will try out his suggestions, but haven’t had time to upgrade WooCommernce yet. I will also ask him to look at the logs, isnce it quite obvious that he can’t replicate the error after I downgraded the plugin.
I read some of the same on the support pages of wpengine. I’ve already tried to delete all modules and themes, except for WooCommerce, WooCommerce Quickpay and Twenty Fourteen. Still got the 502 though.
OK. I now updated to the newest version 3.0.4 and now I see the 502 server error again.
So I contacted WP Engine and asked them to look in the logs. Here’s their reply:
It looks like it’s an error with the plugin.
It’s causing what’s called a segmentation fault:
[Wed Nov 05 16:59:01 2014] [notice] child pid 5706 exit signal Segmentation fault (11)
I found that in the logsHope you can use that in your investigation and I look forward to getting an update. Meanwhile I will downgrade (again, phew)…
- The topic ‘502 Bad Gateway’ is closed to new replies.