Hello @Obaid UrRehman ,
Thanks for the question and using MS Q&A platform.
The error `504 Gateway Time-out' usually occurs when your Azure Function takes more than 230 seconds to return a response. Azure Functions activity times out after 230 seconds regardless of the "functionTimeout" setting you've configured in the settings. In case if your Azure function takes more than 230 seconds to return a response, you may work around this behavior by following an async pattern or use Durable Functions. The benefit of Durable Functions is that they offer their own state-tracking mechanism, so you won't have to implement your own. S
Here is the document for reference: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-azure-function-activity#timeout-and-long-running-functions
Since it used to work until yesterday and started failing suddenly, I would recommend to check the response time of your Azure function when it was successful v/s with the failed ones. If it is taking more than 230 seconds and failing, then we can conclude that as the root cause and you may implement the above mentioned workaround to avoid this in future.
Hope this info helps.