An Azure service that provides an event-driven serverless compute platform.
Hello @Sean Doherty,
Thanks for using Q and A forum.
The error you’re encountering, ClientConnectorDNSError: Cannot connect to host xxx.azurewebsites.net:443 ssl:default [Timeout while contacting DNS servers], typically indicates a DNS resolution issue. This can happen when your Azure Function on the consumption plan is trying to reach the HTTP endpoint hosted on a flex consumption plan that is connected to a VNet. Here are some steps you can take to troubleshoot and potentially resolve the issue:
- Check VNet Configuration: Ensure that the VNet configuration allows outbound traffic from your Azure Function to the HTTP endpoint.
- DNS Settings: Since you’re using the default Azure DNS, you might want to check if there are any custom DNS settings that could be affecting the resolution. If your HTTP function is deployed in a different region or has specific DNS requirements, consider configuring a private DNS zone.
- Connection Pooling: Implement connection pooling and keep-alive settings in your Azure Function to reduce the frequency of DNS lookups and improve connection reuse.
By following these steps, you should be able to reduce the occurrence of DNS-related errors.
If the Answer is helpful, please click Accept Answer and Up-Vote 👍, so that this can be beneficial to other community members.