• Resolved TechMan

    (@techman)


    So a customer reported that he is facing issue placing order on website. I tried adding product in cart and got CloudFlare bad gateway error.

    Error 502 Ray ID: 5cbcf8ab2ff7c605 ? 2020-09-01 06:35:28 UTC
    Bad gateway

    Now how do I diagnose and fix this error? Previously there was issue with Yoast SEO plugin and disabling it worked. But this time even disabling this plugin didn’t work. I even went into CloudFlare control panel and changed website from “Proxy” to “DNS only” but same issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter TechMan

    (@techman)

    Just noticed that this error is randomly coming for some products. So not all products has this issue.

    Thread Starter TechMan

    (@techman)

    Further investigation revealed that only the last product that I entered a couple of days ago is working. Tried 9, 10 random products but they all show error when I add them in cart.

    Thread Starter TechMan

    (@techman)

    I am seeing following entry in nginx log file.

    ) AND fs_posts.post_type = ‘size-chart’ AND ((fs_posts.post_status = ‘publish’)) GROUP BY fs_posts.ID ORDER BY fs_posts.post_date DESC LIMIT 0, 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_

    2020/09/01 03:58:34 [error] 22156#22156: *419 upstream sent too big header while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: https://www.mysite.com, request: “POST /product/clothing/my-product/ HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php/php7.3-fpm.sock:”, host: “www.mysite.com”, referrer: “https://www.mysite.com/product/clothing/my-product/?doing_wp_cron=1598947106.0789239406585693359375”

    • This reply was modified 4 years, 3 months ago by TechMan.
    Nico

    (@nicolamustone)

    Automattic Happiness Engineer

    Hello there,
    This kind of problem is usually caused by either a conflict with your theme or with another plugin.
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.

    I also recommend contacting CloudFlare for further investigation!

    Thread Starter TechMan

    (@techman)

    Added following lines in nginx.conf fixed the issue

    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Getting CloudFlare bad gateway error…losing sales….how to fix’ is closed to new replies.