locked
Azure Web App with API RRS feed

  • Question

  • We have a Azure Web App that does an API call to a Sql Database in Azure. If we get a "Transport level error while connecting to SQL azure DB" where does that get logged?


    Chris

    Tuesday, November 26, 2019 7:43 PM

Answers

  • Apologies if the above post was not so clear. Yes, you can view the logs for the exception, as I mentioned in the above post/document- Enable diagnostics logging for web apps in Azure App Service –(Expanding more on the steps)- kindly enable the “Application logging” as verbose, reproduce the issue, we can fetch more details on the exception from the eventlog.xml file.

    The Application logging: logs messages generated by your application code.

    1. To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs.
      1. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both.

    The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours (For your case, you may chose FileSystem). The Blob option is for long-term logging, and needs a blob storage container to write logs to. 

    If the issue still persists or the logs does not provide any useful info, please do share more details on your setup/framework/and concealed log (with no private info) details for better assistance. 

    Kindly let us know how it goes or you need more information we would be more than happy to assist you further. 

    • Marked as answer by IfEyeOnlyKnew Wednesday, November 27, 2019 5:16 PM
    Wednesday, November 27, 2019 4:43 PM
    Owner

All replies

  • Since when are you facing this issue? Are you using a dynamic IP?
    There could be many causes for this issue, so I would suggest you narrow down the issue:

    Typically, App Service roles can experience SQL connectivity failures for multiple reasons:

    1. SQL server not accessible (due to SQL down, firewall issues, etc)
    2. SQL server authentication failure
    3. Connectivity issues only when executing long queries due to TOR settings (NRP issue)
    4. SQL Always On configured incorrectly.

    Take a look at the document Troubleshoot connection issues to Azure SQL Database for a step-step instructions.

    You may checkout the documentation Enable diagnostics logging for web apps in Azure App Service for enabling the logs and analyze them to fetch more details on the issue.  

    Kindly let us know how the above goes for further investigation.

    Wednesday, November 27, 2019 6:38 AM
    Owner
  • Thanks for the information, but I am looking for an answer to my question? Does this error get logged? Where? How?

    Chris

    Wednesday, November 27, 2019 3:29 PM
  • Apologies if the above post was not so clear. Yes, you can view the logs for the exception, as I mentioned in the above post/document- Enable diagnostics logging for web apps in Azure App Service –(Expanding more on the steps)- kindly enable the “Application logging” as verbose, reproduce the issue, we can fetch more details on the exception from the eventlog.xml file.

    The Application logging: logs messages generated by your application code.

    1. To enable application logging for Windows apps in the Azure portal, navigate to your app and select App Service logs.
      1. Select On for either Application Logging (Filesystem) or Application Logging (Blob), or both.

    The Filesystem option is for temporary debugging purposes, and turns itself off in 12 hours (For your case, you may chose FileSystem). The Blob option is for long-term logging, and needs a blob storage container to write logs to. 

    If the issue still persists or the logs does not provide any useful info, please do share more details on your setup/framework/and concealed log (with no private info) details for better assistance. 

    Kindly let us know how it goes or you need more information we would be more than happy to assist you further. 

    • Marked as answer by IfEyeOnlyKnew Wednesday, November 27, 2019 5:16 PM
    Wednesday, November 27, 2019 4:43 PM
    Owner
  • Will give this a try.

    Chris

    Wednesday, November 27, 2019 5:17 PM
  • Will give this a try.

    Chris

    Sure, please let us know.  Thanks for the update, Chris. 
    Wednesday, November 27, 2019 6:30 PM
    Owner