Share via

Servere outbound connectivity problems with our function apps

Anže Demšar 5 Reputation points
2026-02-08T08:33:57.2333333+00:00

We are experiencing random connectivity errors to outbound addresses from our function apps maistra-proxy-prod, maistra-proxy-prod-2 and maistra-proxy-stage

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.

{count} votes

2 answers

Sort by: Most helpful
  1. Nikhil Duserla 9,685 Reputation points Microsoft External Staff Moderator
    2026-02-08T16:21:54.3666667+00:00

    Hello @Anže Demšar ,

    It sounds like you're facing some tricky outbound connectivity issues with your function apps: maistra-proxy-prod, maistra-proxy-prod-2, and maistra-proxy-stage. Here are some steps you can take to troubleshoot and potentially resolve the connectivity errors:

    Check for SNAT Port Issues: Azure Functions are limited to 128 outbound SNAT ports by default. If your function app is making many outbound connections to the same address and port combination, it may exhaust these ports. Make sure to monitor your connections regularly.

    Use Dependency Injection: If you're using .NET, consider implementing dependency injection to maintain a persistent outbound connection instead of creating new connections for each call. This can help mitigate hitting the connection limits.

    Review Networking Settings: If your functions are behind a firewall or configured with inbound IP restrictions, ensure that the necessary outbound addresses are whitelisted on your backend services. You can find the outbound IP addresses for your function app in the Azure portal or via CLI.

    Network Troubleshooter: Utilize the Network Troubleshooter from the Diagnose and Solve blade in Azure to diagnose connectivity issues more effectively.

    Monitor Activity: Use tools like netstat via SSH to see active connections if you're on Linux. This can give you insights into whether connections are being established as expected.

    Optimize Retry Logic: If your application has aggressive retry logic, it might be causing rapid reopening of connections. Consider reducing the frequency of retries and implementing backoff strategies.

    Use Keep-Alives: Implementing HTTP keep-alives can help manage idle timeout issues and allow for better reuse of existing outbound connections.

    For additional resources and detailed guidance, check out these articles:

    Hope this helps!

    0 comments No comments

  2. Q&A Assist
    2026-02-08T08:34:06.5766667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Experiencing random connectivity errors with your Azure Function apps could be related to hitting limits on outbound connections. Here are some potential causes and solutions:

    1. SNAT Port Exhaustion: Azure uses Source Network Address Translation (SNAT) for outbound connections, and each instance of your function app is initially allocated 128 SNAT ports. If your app rapidly opens new connections, it can exhaust these ports, leading to intermittent connectivity issues. To mitigate this, consider implementing connection pooling to reuse existing connections instead of opening new ones.
    2. Scaling: If your function apps are under heavy load, consider scaling out your App Service plan to more instances. Each instance has its own set of SNAT ports, which can help distribute the outbound connection load and reduce the likelihood of exhausting SNAT ports.
    3. Use of NAT Gateway: Implementing a NAT gateway can provide up to 64,000 outbound SNAT ports, which can significantly alleviate port exhaustion issues. This also gives you a dedicated outbound IP address.
    4. Service Endpoints and Private Endpoints: If your function apps are connecting to Azure services, using service endpoints or private endpoints can help avoid SNAT port restrictions altogether.
    5. Monitoring and Diagnostics: Utilize Azure monitoring tools to diagnose and monitor the outbound connectivity issues. This can help identify patterns or specific times when connectivity issues occur.

    By addressing these areas, you can potentially resolve the connectivity problems your function apps are experiencing.


    References:

    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.