Unable to add product due to CloudFlare Error 502

I have this shopping website based on WooCommerce and this problem just started happening. I am unable to add new product. I can view products, I can view orders, even the main website is working and I can browse products but as soon as I click “Add New” product button in back end admin panel, CloudFlare throws Error 502 Bad Gateway. Screenshot given below:

I have not changed anything in CloudFlare and site was working fine before. What is happening here?

Problem URL is something like:
https://www.cloudflare.com/wp-admin/post-new.php?post_type=product

It was caused by plugin Yoast SEO as disabling this plugin fixed the issue. Now need to find out why it is happening like this.