Azure App Service - Azure Database for MySQL flexible server - VNet integration / private connection (DNS)

PeterT94 0 Reputation points
2023-11-10T12:25:39.01+00:00

Hello everyone,

Recently I created a new Azure Database for MySQL flexible server and connected an already existing Azure App Service to the newly created DB MySQL flexible server via VNet integration with a private DNS zone.

The connection seems to work fine, however, at random moments the Database is unreachable for the App Service for about 5-15 minutes. When then going to the App Service website, it shows the following error:

Open database error php_network_getaddresses: getaddrinfo failed: No such host is known. Application error

I have tried many things, adding a Connection String, adding a Service Connector, etc.
I just cannot find the issue.

Is it perhaps because I configured the private connection incorrectly?
Have I added the connection string or service connector the wrong way?

Does anyone perhaps know what else I could try?
Or could someone tell me the exact steps to configure the private connection between the App Service and Database server?

Thank you in advance.

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
411 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,033 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 11,936 Reputation points Microsoft Employee
    2023-11-11T20:07:16.4466667+00:00

    @PeterT94 Can you start with the below 5 steps? Let me know if none of them resolve the issue by replying to this message and we can assist you further.

    Check the logs: Check the logs for your Azure App Service and Azure Database for MySQL flexible server to see if there are any error messages or warnings that could indicate the cause of the issue.

    1. Check the VNet integration: Verify that the VNet integration between your Azure App Service and Azure Database for MySQL flexible server is configured correctly. Ensure that the VNet and subnet are correctly configured, and that the private DNS zone is correctly set up.

    Check the firewall rules: Verify that the firewall rules for your Azure Database for MySQL flexible server are correctly configured to allow traffic from the VNet.

    Check the connection string: Verify that the connection string for your Azure App Service is correctly configured to use the private DNS zone and VNet integration.

    Check the service endpoint: Verify that the service endpoint for your Azure Database for MySQL flexible server is correctly configured to allow traffic from the VNet.