Blog Post

Apps on Azure Blog
1 MIN READ

Be rational about SNAT Port Exhaustion Alert on Azure App Service

YangYu's avatar
YangYu
Icon for Microsoft rankMicrosoft
Jun 25, 2021

Recently Azure App Service users might receive email alert on potential SNAT Port Exhaustion risk of services. Here is a sample email.  

 

 

This post is about looking at this alert rationally. 

 

This alert alone does not mean there is a drop in availability or performance of our app services.   

 

If we suspect the availability or performance of our app services degraded and SNAT Port Exhaustion is a possible reason for that, we can have a quick check if there were below symptoms correlated with the alert.  

  

  • Slow response times on all or some of the instances in a service plan.  
  • Intermittent 5xx or Bad Gateway errors  
  • Timeout error messages  
  • Could not connect to external endpoints (like SQLDB, Service Fabric, other App services etc.)  

  

Because SNAT Port is consumed only when there are outbound connections from App Service Plan instances to public endpoints. If port exhausted, there must be delay or failure in those outbound calls. Above symptoms will help justify if we are on the right track looking into SNAT Port Exhaustion.   

 

If we did observe slowness or failure in outbound calls that correlated with the email alert, we may refer to the guidance section mentioned in alert email and this document Troubleshooting intermittent outbound connection errors in Azure App Service - Azure App Service | Microsoft Docs for further troubleshooting.  

 

Published Jun 25, 2021
Version 1.0
  • hi stosho ,

     

    The alert mentioned in this blog was previously sent from Platform. It was for testing purpose and caused some confusions. This blog was therefore posted for clarification.

    You may learn SNAT Port Exhaustion status via the SNAT Port Exhaustion detector in Diagnose and solve problems blade of your App Service. But I am afraid email notification feature has not been integrated with the detector by the time of writing.

    Alternatively, you can go to the Alerts blade of your App Service to set up a rule to monitor average response time because SNAT Port Exhaustion often correlates with slow response times as explained in the blog.

     

     

     

     

     

  • stosho's avatar
    stosho
    Copper Contributor

    Hello YangYu ,

    Could you share how can I set up a rule for SNAT Port Exhaustion Alert?