Error 524 - (but work fine with DNS only)

Getting this error for the past few weeks.
My hosting provider is Godaddy. And i have sat with their support team who confirmed that the server and FW is not an issue from their end. i also see that the site loads instantly when i change the Cloudflare DNS setting from Proxy-> DNS only. This would indicate that the hosting provider server is fine.
I have enabled all the Optimization setting that are allowed in my profile. but still face the issue.
Any idea why its happening or solution for this?