getting an intermittent azure function app dns error

Sam Walker 0 Reputation points
2025-12-13T11:20:51.11+00:00

I have started getting intermittent dns lookup errors in my azure python function.

And its simplying trying to connect to an Azure storage account.

Anyone else had this and been able to work-around or resolve it.

: <urllib3.connection.HTTPSConnection object at 0x7c5edcb2cd60>
Failed to resolve 'xxxx.table.core.windows.net' ([Errno -3] Temporary failure in name resolution)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-13T11:21:18.4333333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Intermittent DNS lookup errors in Azure Functions can be caused by several factors. Here are some troubleshooting steps you can take to resolve the issue:

    1. Check Firewall Settings: Ensure that there are no firewalls or Network Security Groups (NSGs) blocking access to the DNS servers. Firewalls can prevent DNS queries from reaching the servers or the responses from coming back.
    2. Test DNS Accessibility: Use the nameresolver.exe tool from the Kudu console or Azure portal-hosted console to check if DNS is working properly. This tool can help you verify if your function app can resolve the hostname of the Azure storage account.
         nameresolver.exe xxxx.table.core.windows.net
      
    3. Check Virtual Network Integration: If your Azure Function is integrated with a virtual network, ensure that the DNS settings are correctly configured. Verify that the DNS servers specified in your virtual network settings are reachable.
    4. Review Application Logs: Check the logs of your Azure Function to see if there are any patterns or specific times when the DNS errors occur. This might help identify if the issue is related to load or specific requests.
    5. Retry Logic: Implement retry logic in your application to handle transient errors. Sometimes, DNS resolution might fail temporarily, and a retry can succeed.
    6. Contact Azure Support: If the issue persists, consider reaching out to Azure support for further assistance, especially if it seems to be a broader issue affecting multiple users.

    By following these steps, you should be able to diagnose and potentially resolve the DNS lookup errors you're experiencing with your Azure Function app.


    References:

    0 comments No comments

  2. Anurag Rohikar 3,185 Reputation points Microsoft External Staff Moderator
    2025-12-15T04:42:32.1033333+00:00

    Hey Sam! It sounds like you're running into some pesky intermittent DNS lookup errors while trying to connect your Azure Python function to your storage account. Here are a few things you might want to check:

    1. Connection Limits: Intermittent connection issues can sometimes arise if your function is exhausting its source network address translation (SNAT) ports. Azure App Service instances initially have a preallocated number of SNAT ports (typically 128). If your function app is making many outbound connections or hitting the same destination frequently, this can lead to connectivity issues. To learn more about that, you can check out this article: Troubleshoot intermittent outbound connection errors in Azure App Service.
    2. Function App Logs: Have you checked the logs in Application Insights (if enabled) or through the Kudu SCM site? Look for any relevant error messages that might give more insight into what’s causing the DNS lookup failures. Here's a guide on using Application Insights.
    3. Storage Account Configuration: Ensure that your storage account settings are correctly configured. If your Azure Function is running on the Consumption plan, there are specific storage account settings you should verify. The documentation on storage account settings might help.
    4. Network Configuration: If your Function App is in an App Service Environment, ensure that inbound and outbound rules, as well as any firewalls, are configured correctly to allow access. This might affect connectivity to external resources.
    5. Retry Logic: Implementing retry logic can sometimes help mitigate transient failures. You can refer to the Retry pattern documentation for more details on how to do that effectively.

    Hope this helps you get to the bottom of the DNS issues! If the problem persists, could you provide some additional details so we can better assist you? Here are a few follow-up questions:

    1. Are there any specific times when the DNS errors occur, or do they seem random?
    2. How many outbound connections does your function typically make?
    3. Are you using any specific libraries or patterns for making connections to Azure Storage?
    4. Can you confirm if you have Application Insights enabled and if there are any specific errors logged during the incidents?

    Feel free to reach out with more info!

    Note: This content was drafted with the help of an AI system.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.