Reputation: 5236
I have using a public connection to a Azure MySQL database from a Azure Web App using a PHP 7.4 stack (soon to be PHP 8.2). Things work fine up to about 2500 requests/min and I start getting database connection timeouts.
This article indicates that the problem is likely that I am exhausting outbound connections from the Web APP: https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-intermittent-outbound-connection-errors
One of the suggested solutions I found elsewhere was to setup a private connection to the database, which I did. Using VNet integration into the Web App and a private endpoint for my database. I simply set the endpoint to an address of 10.1.1.4 to avoid having to setup a private DNS server.
So then I changed the connection URL to the database like so...
mysql://user:[email protected]:3306/mydatabase?serverVersion=8.0.31
So it does connect, but now my outbound connections seem to limited to 1. Every overlapping query to the database times out. What is going on here? I went to a VNet and a private connection to get a big pipe and now it seems I have a tiny pipe.
Upvotes: 0
Views: 142