I have got a Azure Function APP, HTTP trigger calling a webservice and passing on Soap message containing XML. (hosted via APP service plan) Locally, using VS2019 the function successfully reaches the web service and receives response within 25 seconds or less. When published to Azure, the function timesout only after < 23 Seconds.
I get a HTTP server 500 error back: 2021-10-20T09:54:46.263 [Error] Executed 'XXXX' (Failed, Id=0cc4db22-f9ba-4c5d-9f6e-ecd1da394333, Duration=22131ms)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Update: this has been resolved by creating a virtual network for all outbound requests for the function app https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-nat-gateway.