Azure SQL database timeout after hosting website in godaddy

Pinkal Patel 0 Reputation points
2023-07-05T09:13:56.68+00:00

I have the website hosted on Godaddy which is used Azure SQL database at the backend. Website is suddenly stopped working with below error.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

However while looking into Azure database health it show below things to me.

image

Azure Support team, Please help me to resolve issue.

Azure SQL Database
{count} votes

2 answers

Sort by: Most helpful
  1. Sreeju Nair 12,666 Reputation points
    2023-07-05T09:52:00.99+00:00

    Since you are using Azure SQL, I recommend you host your application in Azure Web App. If you are connecting your database from an external hosting provider, through internet, I can forsee lots of architectural issues, including performance and security.

    Read the following reference architecture for a basic web application with Azure Web App and Azure SQL

    https://learn.microsoft.com/en-us/azure/architecture/web-apps/app-service/architectures/basic-web-app?tabs=cli

    Now to solve it quickly, until you take an architectural decision, implement retry logic in your application.

    https://devblogs.microsoft.com/azure-sql/configurable-retry-logic-for-microsoft-data-sqlclient/

    https://github.com/Huachao/azure-content/blob/master/articles/sql-database/sql-database-develop-csharp-retry-windows.md

    Hope this helps

    0 comments No comments

  2. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-07-05T10:40:47.5766667+00:00

    In addition to Sreejukg's answer:

    First of all, this is a peer-to-peer forum, and not really the Azure support team. I don't know where that link "Contact support" in the screenshot took you, but there is a proper place to submit support tickets for Azure. (And the advantage with this is that they may have access to logs etc and therefore say a little more of what might have happened. Then again, the support case may also re-appear as an line item on your bill from Azure, I don't know.)

    I would guess from the error message, that your database is Serverless. Serverless is a great option for databases that mainly are idle, since when the database is idle you are only paying for the storage and not for compute, as the database is unloaded. But the price is that once you access the database, it takes a while until comes online. I usually have to try 2-3 times with my Serverless databases. As Sreejukg says, you might benefit from having retry logic. Or simply a longer connection timeout.

    And if you don't like this behaviour at all, you should switch to a Provisioned tier, but the bill is likely to go up in this case.

    0 comments No comments

Your answer

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